[37814] trunk/dports/lang/python24

raimue at macports.org raimue at macports.org
Tue Jun 24 14:52:54 PDT 2008


Revision: 37814
          http://trac.macosforge.org/projects/macports/changeset/37814
Author:   raimue at macports.org
Date:     2008-06-24 14:52:54 -0700 (Tue, 24 Jun 2008)
Log Message:
-----------
Merged revisions 36460,36462-36463,36654,37481,37529,37811-37812 via svnmerge from 
https://svn.macosforge.org/repository/macports/branches/python-frameworks/dports/lang/python24

........
  r36460 | raimue at macports.org | 2008-05-03 02:22:04 +0200 (Sat, 03 May 2008) | 3 lines
  
  lang/python24:
  Remove all hardcoded versions
........
  r36462 | raimue at macports.org | 2008-05-03 05:01:09 +0200 (Sat, 03 May 2008) | 6 lines
  
  lang/python24, lang/python25:
  Major changes to make the ports more similar. I hope I didn't miss some
  changes.
  This still does not contain any hook to make the transition easier, but these
  ports are now very similar which makes them easier to maintain.
........
  r36463 | raimue at macports.org | 2008-05-03 05:08:16 +0200 (Sat, 03 May 2008) | 3 lines
  
  lang/python24:
  Update to 2.4.5
........
  r36654 | raimue at macports.org | 2008-05-09 16:29:30 +0200 (Fri, 09 May 2008) | 3 lines
  
  lang/python{24,25}:
  Remove unnecessary links to libpython.dylib, should be handled by python_select
........
  r37481 | raimue at macports.org | 2008-06-09 19:36:10 +0200 (Mon, 09 Jun 2008) | 5 lines
  
  lang/python{24,25,30}:
  Make the ports more similar.
  These ports install fine for me now and also work with py-* and py25-* ports
  providing modules, but need testing by others.
........
  r37529 | raimue at macports.org | 2008-06-11 17:32:11 +0200 (Wed, 11 Jun 2008) | 3 lines
  
  lang/python{24,25,30}:
  Correct a symlink inside the framework directory pointing into the destroot
........
  r37811 | raimue at macports.org | 2008-06-24 22:36:46 +0200 (Tue, 24 Jun 2008) | 3 lines
  
  lang/python{24,25,30}:
  Add better post-activate message
........
  r37812 | raimue at macports.org | 2008-06-24 22:38:25 +0200 (Tue, 24 Jun 2008) | 3 lines
  
  lang/python{24,25,30}:
  Bump revisions
........

Modified Paths:
--------------
    trunk/dports/lang/python24/Portfile

Property Changed:
----------------
    trunk/dports/lang/python24/


Property changes on: trunk/dports/lang/python24
___________________________________________________________________
Name: svnmerge-integrated
   - /branches/python-frameworks/dports/lang/python24:1-34803
   + /branches/python-frameworks/dports/lang/python24:1-37813

Modified: trunk/dports/lang/python24/Portfile
===================================================================
--- trunk/dports/lang/python24/Portfile	2008-06-24 21:45:54 UTC (rev 37813)
+++ trunk/dports/lang/python24/Portfile	2008-06-24 21:52:54 UTC (rev 37814)
@@ -2,141 +2,126 @@
 
 PortSystem 1.0
 
-name            python24
-version         2.4.5
-revision        1
-set major_version   2
-set minor_version   4
-categories      lang
-platforms       darwin freebsd linux
-maintainers     nomaintainer
-description     An interpreted, object-oriented programming language
-long_description    Python is an interpreted, interactive, object-oriented \
-                    programming language.
+name                    python24
+version                 2.4.5
+revision                2
+set major               2
+set branch              2.4
+categories              lang
+platforms               darwin
+maintainers             nomaintainer
 
-homepage        http://www.python.org/
-master_sites    ${homepage}ftp/python/${version}/ \
-                ftp://ftp.python.org/pub/python/${version}/
-distname        Python-${version}
-checksums       md5 750b652bfdd12675e102bbe25e5e9893
-patchfiles      patch-configure \
-                patch-Makefile.pre.in \
-                patch-Lib-cgi.py \
-                patch-Lib-site.py \
-                patch-setup.py \
-                patch-Include-pyport.h \
-                patch-Mac-OSX-Makefile.in \
-                patch-Mac-OSX-IDLE-Makefile.in \
-                patch-Mac-OSX-PythonLauncher-Makefile.in
-#the bzip2-archive of 2.4.5 on python.org is broken (its a gzip-archive..);
-#use_bzip2       yes
-extract.suffix	.tgz
+description             An interpreted, object-oriented programming language
+long_description        Python is an interpreted, interactive, object-oriented \
+                        programming language.
 
-depends_lib     port:gettext
+homepage                http://www.python.org/
+master_sites            ${homepage}/ftp/python/${version}/ \
+                        ftp://ftp.python.org/pub/python/${version}/ \
+                        ftp://ftp.fastorama.com/mirrors/ftp.python.org/pub/python/${version}/ \
+                        ftp://ftp.python.jp/pub/python/${version}/
 
-configure.args  --enable-shared \
-                --mandir=${prefix}/share/man \
-                --bindir=${prefix}/bin \
-                --libdir=${prefix}/lib \
-                --without-readline \
-                --enable-framework=${prefix}/Library/Frameworks \
-                --disable-tk \
-                --enable-ipv6
+distname                Python-${version}
+extract.suffix          .tgz
 
+checksums               md5     750b652bfdd12675e102bbe25e5e9893 \
+                        sha1    927c6e93ed3ea3bee4e07eff4b0f14254dc04147 \
+                        rmd160  6c1c2905b166038fda5edb14baadbeb59acc8005
+
+patchfiles              patch-configure \
+                        patch-Makefile.pre.in \
+                        patch-Lib-cgi.py \
+                        patch-Lib-site.py \
+                        patch-setup.py \
+                        patch-Include-pyport.h \
+                        patch-Mac-OSX-Makefile.in \
+                        patch-Mac-OSX-IDLE-Makefile.in \
+                        patch-Mac-OSX-PythonLauncher-Makefile.in
+
+depends_lib             port:gettext
+
+configure.args          --enable-shared \
+                        --enable-framework=${prefix}/Library/Frameworks \
+                        --mandir=${prefix}/share/man \
+                        --without-readline \
+                        --disable-tk \
+                        --enable-ipv6
+
+use_parallel_build      no
+
 post-patch {
-    reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/cgi.py
-    reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/site.py
-    reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Mac/OSX/Makefile.in
-    reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/setup.py
+        reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/cgi.py
+        reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Lib/site.py
+        reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/Mac/OSX/Makefile.in
+        reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/setup.py
 }
 
-build.target    all libpython2.4.dylib
+build.target            all libpython${branch}.dylib
 
 # Workaround for case-sensitive file systems
 post-build {
     if { ![file exists ${worksrcpath}/python.exe] } {
-        ln -s python ${worksrcpath}/python.exe  
+        ln -s python ${worksrcpath}/python.exe
     }
 }
 
-test.run        yes
-test.target     test
+test.run                yes
+test.target             test
 
-destroot.target frameworkinstall maninstall
+destroot.target         frameworkinstall maninstall
+
 post-destroot {
-    if { [variant_isset macosx]} {
-        set framewdir ${prefix}/Library/Frameworks/Python.framework
-        xinstall -m 755 -d ${destroot}${framewdir}/Versions/2.4/include
-       ln -s Versions/Current/lib ${destroot}${framewdir}/Libraries
-       ln -sf ${framewdir}/Versions/2.4/bin/pydoc ${destroot}${prefix}/bin/pydoc
-       ln -sf ${framewdir}/Versions/2.4/bin/pydoc ${destroot}${prefix}/bin/pydoc24
-       ln -s ${prefix}/lib/python2.4/config ${destroot}${framewdir}/Versions/2.4/lib/python2.4/config
-       ln -s ${framewdir}/Versions/2.4/lib/libpython${major_version}.${minor_version}.dylib ${destroot}${prefix}/lib/libpython${version}.dylib
-       ln -s ${framewdir}/Versions/2.4/lib/libpython${major_version}.${minor_version}.dylib ${destroot}${prefix}/lib/libpython${major_version}.${minor_version}.dylib
-       ln -s ${framewdir}/Versions/2.4/lib/libpython${major_version}.${minor_version}.dylib ${destroot}${prefix}/lib/libpython${major_version}.dylib
-       ln -s ${framewdir}/Versions/2.4/lib/libpython${major_version}.${minor_version}.dylib ${destroot}${prefix}/lib/libpython.dylib
-    } elseif { [variant_isset darwin]} {
-       ln -s libpython${major_version}.${minor_version}.dylib ${destroot}${prefix}/lib/libpython${version}.dylib
-       ln -s libpython${major_version}.${minor_version}.dylib ${destroot}${prefix}/lib/libpython${major_version}.dylib
-       ln -s libpython${major_version}.${minor_version}.dylib ${destroot}${prefix}/lib/libpython.dylib
-    } else {
-        system "cd ${destroot}${prefix}/lib && \
-        ln -s libpython${major_version}.${minor_version}.so \
-            libpython${version}.so && \
-        ln -s libpython${major_version}.${minor_version}.so \
-            libpython${major_version}.so && \
-        ln -s libpython${major_version}.${minor_version}.so \
-            libpython.so"
-    }
-}
+        set framewpath ${prefix}/Library/Frameworks/Python.framework
+        set framewdir  ${framewpath}/Versions/${branch}
 
-# needed to trigger the variant_isset check above
-platform macosx {}
+        foreach dir { lib include } {
+            file rename ${destroot}${framewdir}/${dir}/python${branch} ${destroot}${prefix}/${dir}
+            ln -s ${destroot}${prefix}/${dir}/python${branch} ${destroot}${framewdir}/${dir}/python${branch}
+        }
 
-# delete symlinks without version suffix, use python_select instead to choose version
-platform darwin {
-    post-destroot {
-        file delete ${destroot}${prefix}/bin/python
-        file delete ${destroot}${prefix}/bin/pythonw
-        file delete ${destroot}${prefix}/bin/idle
-        file delete ${destroot}${prefix}/bin/pydoc
-        file delete ${destroot}${prefix}/bin/smtpd.py
-        file rename ${destroot}${prefix}/share/man/man1/python.1 ${destroot}${prefix}/share/man/man1/python2.4.1
+        file rename ${destroot}${framewdir}/lib/libpython${branch}.dylib ${destroot}${prefix}/lib
+        ln -s ${destroot}${prefix}/lib/libpython${branch}.dylib ${destroot}${framewdir}/lib/libpython${branch}.dylib
 
+        file rename ${destroot}${prefix}/share/man/man1/python.1 ${destroot}${prefix}/share/man/man1/python${branch}.1
+
+        # delete symlinks without version suffix, use python_select instead to choose version
+        foreach bin { python pythonw idle pydoc smtpd.py } {
+            file delete ${destroot}${prefix}/bin/${bin}
+        }
+        foreach bin [list python${branch} pythonw${branch} idle${branch} pydoc${branch} smtpd${branch}.py] {
+            file rename -force ${destroot}${framewdir}/bin/${bin} ${destroot}${prefix}/bin
+            ln -s ${prefix}/bin/${bin} ${destroot}${framewdir}/bin/${bin}
+        }
+
+        foreach dir { Headers Resources Python Versions/Current } {
+            file delete ${destroot}${framewpath}/${dir}
+        }
+
         # install select file for python_select
         xinstall -m 755 -d ${destroot}${prefix}/etc/select/python
-        xinstall -m 644 ${filespath}/python24 ${destroot}${prefix}/etc/select/python/
-    }
+        xinstall -m 644 ${filespath}/python[string map {. {}} ${branch}] ${destroot}${prefix}/etc/select/python/
 }
 
-platform puredarwin {
-    configure.args-delete   --enable-framework=${prefix}/Library/Frameworks
-    configure.args-append   --disable-toolbox-glue --disable-framework
-    destroot.target     install maninstall
+post-activate {
+    ui_msg "\nTo fully complete your installation and make python $branch the default, please run
+\n\tsudo port install python_select \
+\n\tsudo python_select $name\n"
 }
 
 platform darwin 8 {
-    configure.args-append --with-cxx=/usr/bin/g++-4.0
+        # TODO: would configure.compiler be more appropriate?
+        configure.args-append           --with-cxx=/usr/bin/g++-4.0
 }
 
 platform darwin 9 {
-    configure.cppflags-append    -D__DARWIN_UNIX03
+        configure.cppflags-append       -D__DARWIN_UNIX03
 }
 
-platform freebsd {
-    configure.args-delete   --enable-framework=${prefix}/Library/Frameworks
-    configure.args-append   --disable-framework
-    build.target        all libpython2.4.so
-    destroot.target     install maninstall
-}
+# TODO: test if this universal variant actually works
+# variant universal {
+        # configure.args-append           --enable-universalsdk
+# }
 
-platform linux {
-    configure.args-delete   --enable-framework=${prefix}/Library/Frameworks
-    configure.args-append   --disable-framework
-    build.target        all libpython2.4.so
-    destroot.target     install maninstall
-}
-
-livecheck.check regex
-livecheck.url   http://www.python.org/download/releases/
-livecheck.regex Python (2.4.\[0-9\]+)
+livecheck.check         regex
+livecheck.url           ${homepage}download/releases/
+livecheck.regex         Python (${branch}.\[0-9\]+)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080624/cf7ac5ed/attachment.htm 


More information about the macports-changes mailing list