# $Id: Portfile 34838 2008-03-08 11:24:49Z reiffert@macports.org $ PortSystem 1.0 name python30 version 3.0a3 revision 3 categories lang platforms darwin maintainers mww description An interpreted, object-oriented programming language long_description Python is an interpreted, interactive, object-oriented \ programming language. This version is an ALPHA release! homepage http://www.python.org master_sites http://www.python.org/ftp/python/3.0/ distname Python-${version} extract.suffix .tgz checksums md5 ec525b7e7fe4383e8394fab721663252 patchfiles patch-setup.py.diff \ patch-Makefile.pre.in.diff \ patch-Lib-cgi.py.diff depends_lib port:gettext depends_run port:python_select configure.args --without-readline --enable-shared --enable-ipv6 --disable-tk --enable-framework=${prefix}/Library/Frameworks destroot.target libpython3.0.dylib frameworkinstall maninstall post-patch { reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/cgi.py reinplace "s|/Applications/MacPython|/Applications/MacPorts/MacPython|g" \ Mac/Makefile.in Mac/IDLE/Makefile.in \ Mac/IDLE/Makefile.in Mac/Tools/Doc/setup.py \ Mac/PythonLauncher/Makefile.in \ Mac/BuildScript/build-installer.py xinstall -m 644 ${filespath}/mac_japanese.py Lib/encodings/x_mac_japanese.py } post-destroot { system "cd ${destroot}${prefix}/bin && \ rm idle pydoc python python-config pythonw smtpd.py" system "cd ${destroot}${prefix}/share/man/man1 && \ ln -sf ${prefix}/Library/Frameworks/Python.framework/Versions/3.0/share/man/man1/python.1 python3.0.1" system "cd ${destroot}${prefix}/lib && \ ln -sf ${prefix}/Library/Frameworks/Python.framework/Versions/3.0/lib/libpython3.0.dylib && \ ln -sf ${prefix}/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0" system "mkdir -p ${destroot}${prefix}/include && \ cd ${destroot}${prefix}/include && \ ln -sf ${prefix}/Library/Frameworks/Python.framework/Versions/3.0/include/python3.0" # install select file for python_select xinstall -m 755 -d ${destroot}${prefix}/etc/select/python xinstall -m 644 ${filespath}/python30 ${destroot}${prefix}/etc/select/python/ system "cd ${destroot}${prefix}/Library/Frameworks/Python.framework && \ rm -f Headers Resources Python && \ rm -f Versions/Current" system "cd ${destroot}${prefix}/Library/Frameworks/Python.framework/Versions/3.0/share/man/man1/ && \ gzip python.1" } post-activate { ui_msg "\n\n\nTo fully complete your installation and make python 3.0 the default, \ please run\n\nsudo python_select python30\n\n" } platform darwin 7 { # there is no SystemStubs on 10.3 post-patch { reinplace "s|-lSystemStubs||g" \ configure configure.in } post-configure { reinplace "s|-lSystemStubs||g" \ Makefile.pre.in Makefile.pre Makefile } # To avoid GCC incompatibility issue. See http://nxg.me.uk/note/2004/restFP/ (by ebgssth@gmail.com, ticket #13322) configure.ldflags-append "-lcc_dynamic" } livecheck.check regex livecheck.url http://www.python.org/download/releases/3.0/ livecheck.regex /3.0/Python-(\[0-9a-z.\]+)\\.tgz