# $Id: Portfile 106911 2013-06-11 14:40:14Z jmr@macports.org $

PortSystem 1.0
PortGroup python 1.0

name			py-readline
version			6.2.4.1
platforms		darwin
license			GPL-3+ PSF
maintainers		nomaintainer
description		GNU readline extension for Python
long_description	${description}

homepage		http://www.python.org/
master_sites	http://pypi.python.org/packages/source/r/readline/
distname		readline-${version}
checksums       md5     578237939c81fdbc2c8334d168b17907 \
                sha256  e00f86e03dfe52e7d1502cec5c64070b32621c85509c0081a4cfa6a0294bd107

python.versions	24 25 26 27 31 32 33

if {$subport != $name} {
    patchfiles	build.sh.patch setup.py.patch
    depends_build	port:py${python.version}-setuptools
    post-destroot {
        copy -force ${filespath}/readline.pth ${filespath}/readline_path.py \
            ${destroot}${python.pkgd}
        reinplace "s|__LIBDIR__|${python.libdir}|" ${destroot}${python.pkgd}/readline_path.py
    }
}
