# $Id: Portfile,v 1.3 2006/04/30 14:03:07 mww Exp $

PortSystem 1.0
PortGroup python24 1.0

name			py-readline
version			2.4.3
categories		python
platforms		darwin
maintainers		mww@opendarwin.org
description		readline extension for Python
long_description	${description}

homepage		http://www.python.org/
master_sites	http://www.python.org/ftp/python/${version}/
distname		Python-${version}
dist_subdir		python24
checksums		sha1 d6b81e1aec0045b5acff99676f2abe303da1b384
use_bzip2		yes

depends_lib-append	port:readline

worksrcdir		${worksrcdir}/Modules

extract.post_args	"| tar -xf - ${distname}/Modules/readline.c"
post-extract {
	file copy ${filespath}/setup.py ${worksrcpath}
}

configure {
	reinplace "s|__VERSION__|${version}|g" ${worksrcpath}/setup.py
	reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/setup.py
}

