Ticket #747: Portfile

File Portfile, 1.4 KB (added by robert@…, 21 years ago)

ATTACHMENT: python2.1-2.1.3

Line 
1# $Id: Portfile,v 1.6 2003/07/30 04:24:15 rshaw Exp $
2PortSystem 1.0
3name            python2.1
4version         2.1.3
5categories      lang
6maintainers     robert@or.homeip.net
7description     An interpreted, object-oriented programming language
8platforms       darwin
9distname        Python-${version}
10extract.sufx    .tgz
11master_sites    ftp://ftp.python.org/pub/python/${version}/
12checksums       md5 a8b04cdc822a6fc833ed9b99c7fba589
13depends_lib     lib:expat.0:expat
14extract.only    Python-${version}${extract.sufx}
15post-patch      {
16        reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/setup.py
17        reinplace "s|'Tools/scripts/pydoc'||" ${worksrcpath}/setup.py
18        reinplace "s|osname = string.replace(.*)|&; machine = string.replace(machine, ' ', '_')|" ${worksrcpath}/Lib/distutils/util.py
19        reinplace "s|/bin/env python|&2.1|" ${worksrcpath}/Tools/scripts/pydoc
20}
21configure.args  --with-suffix=.exe --with-dyld
22install.destroot prefix=${destroot}${prefix}
23post-install    {
24        # only keep 2.1 specific version to prevent 2.2 clash
25        file delete ${destroot}${prefix}/bin/python.exe
26        file rename -force ${destroot}${prefix}/bin/python2.1.exe \
27                ${destroot}${prefix}/bin/python2.1
28        system "install -m 0755 ${worksrcpath}/Tools/scripts/pydoc \
29                ${destroot}${prefix}/bin/pydoc2.1"
30}
31
32long_description \
33Python is an interpreted, interactive, object-oriented programming \
34language that combines remarkable power with very clear syntax. \
35\
36This is the older 2.1 series of Python which is needed when installing \
37the Zope and/or Plone ports.
38
39# vim: ts=8 sw=8