[37481] branches/python-frameworks/dports/lang

raimue at macports.org raimue at macports.org
Mon Jun 9 10:36:11 PDT 2008


Revision: 37481
          http://trac.macosforge.org/projects/macports/changeset/37481
Author:   raimue at macports.org
Date:     2008-06-09 10:36:10 -0700 (Mon, 09 Jun 2008)

Log Message:
-----------
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.

Modified Paths:
--------------
    branches/python-frameworks/dports/lang/python24/Portfile
    branches/python-frameworks/dports/lang/python25/Portfile
    branches/python-frameworks/dports/lang/python30/Portfile

Modified: branches/python-frameworks/dports/lang/python24/Portfile
===================================================================
--- branches/python-frameworks/dports/lang/python24/Portfile	2008-06-09 16:33:24 UTC (rev 37480)
+++ branches/python-frameworks/dports/lang/python24/Portfile	2008-06-09 17:36:10 UTC (rev 37481)
@@ -27,8 +27,6 @@
                         sha1    927c6e93ed3ea3bee4e07eff4b0f14254dc04147 \
                         rmd160  6c1c2905b166038fda5edb14baadbeb59acc8005
 
-depends_lib             port:gettext
-
 patchfiles              patch-configure \
                         patch-Makefile.pre.in \
                         patch-Lib-cgi.py \
@@ -39,11 +37,11 @@
                         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 \
-                        --bindir=${prefix}/bin \
-                        --libdir=${prefix}/lib \
                         --without-readline \
                         --disable-tk \
                         --enable-ipv6
@@ -72,26 +70,31 @@
 destroot.target         frameworkinstall maninstall
 
 post-destroot {
-        set framewdir ${prefix}/Library/Frameworks/Python.framework
+        set framewpath ${prefix}/Library/Frameworks/Python.framework
+        set framewdir  ${framewpath}/Versions/${branch}
 
-        xinstall -m 755 -d ${destroot}${framewdir}/Versions/${branch}/include
-        ln -s ${framewdir}/Versions/${branch}/bin/pydoc ${destroot}${prefix}/bin/pydoc[string map {. {}} ${branch}]
-        ln -s ${framewdir}/Versions/${branch}/lib/python${branch} ${destroot}${prefix}/lib/python${branch}
-        ln -s ${framewdir}/Versions/${branch}/lib/libpython${branch}.dylib ${destroot}${prefix}/lib/libpython${version}.dylib
+        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}
+        }
 
-        ln -s ${framewdir}/Versions/${branch}/include/python${branch} ${destroot}${prefix}/include/python${branch}
+        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 python-config } {
+        foreach bin { python pythonw idle pydoc smtpd.py } {
             file delete ${destroot}${prefix}/bin/${bin}
         }
-        ln -s ${framewdir}/Versions/${branch}/share/man/man1/python.1 ${destroot}${prefix}/share/man/man1/python${branch}.1
-        file delete ${destroot}${prefix}/share/man/man1/python.1
+        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 ${destroot}${prefix}/bin/${bin} ${destroot}${framewdir}/bin/${bin}
+        }
 
         foreach dir { Headers Resources Python Versions/Current } {
-            file delete ${destroot}${framewdir}/${dir}
+            file delete ${destroot}${framewpath}/${dir}
         }
-        ln -s Versions/Current/lib ${destroot}${framewdir}/Libraries
 
         # install select file for python_select
         xinstall -m 755 -d ${destroot}${prefix}/etc/select/python

Modified: branches/python-frameworks/dports/lang/python25/Portfile
===================================================================
--- branches/python-frameworks/dports/lang/python25/Portfile	2008-06-09 16:33:24 UTC (rev 37480)
+++ branches/python-frameworks/dports/lang/python25/Portfile	2008-06-09 17:36:10 UTC (rev 37481)
@@ -22,23 +22,21 @@
                         ftp://ftp.python.jp/pub/python/${version}/
 
 distname                Python-${version}
-use_bzip2               yes
+extract.suffix          .tgz
 
 checksums               md5 afb5451049eda91fbde10bd5a4b7fadc \
                         sha1 4755d212f50af704c20224a6966e23acc5aea60f \
                         rmd160 b23b02739833e6730799c5866e2b77aae884b63f
 
-depends_lib             port:gettext
-
 patchfiles              patch-Makefile.pre.in.diff \
                         patch-setup.py.diff \
                         patch-Lib-cgi.py.diff
 
+depends_lib             port:gettext
+
 configure.args          --enable-shared \
                         --enable-framework=${prefix}/Library/Frameworks \
                         --mandir=${prefix}/share/man \
-                        --bindir=${prefix}/bin \
-                        --libdir=${prefix}/lib \
                         --without-readline \
                         --disable-tk \
                         --enable-ipv6

Modified: branches/python-frameworks/dports/lang/python30/Portfile
===================================================================
--- branches/python-frameworks/dports/lang/python30/Portfile	2008-06-09 16:33:24 UTC (rev 37480)
+++ branches/python-frameworks/dports/lang/python30/Portfile	2008-06-09 17:36:10 UTC (rev 37481)
@@ -2,57 +2,93 @@
 
 PortSystem 1.0
 
-name			python30
-version			3.0a3
-revision		1
-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!
+name                    python30
+version                 3.0a3
+revision                1
+set major               3
+set branch              3.0
+categories              lang
+platforms               darwin
+maintainers             mww
 
-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 \
-			patch-Makefile.pre.in.diff
+description             An interpreted, object-oriented programming language
+long_description        Python is an interpreted, interactive, object-oriented \
+                        programming language. This version is an ALPHA release!
 
-depends_lib		port:gettext
-depends_run		port:python_select
-configure.args		--without-readline --enable-shared --enable-ipv6 --disable-tk --enable-framework=${prefix}/Library/Frameworks
+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}/
 
-destroot.target		libpython3.0.dylib frameworkinstall maninstall
+distname                Python-${version}
+extract.suffix          .tgz
 
+checksums               md5 ec525b7e7fe4383e8394fab721663252
+
+patchfiles              patch-setup.py \
+                        patch-Makefile.pre.in.diff
+
+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
+
+build.target            all libpython${branch}.dylib
+
+test.run                yes
+test.target             test
+
+destroot.target         frameworkinstall maninstall
+
 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"
+        set framewpath ${prefix}/Library/Frameworks/Python.framework
+        set framewdir  ${framewpath}/Versions/${branch}
 
-	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"
+        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}
+        }
 
-	system "mkdir -p ${destroot}${prefix}/include && \
-		cd ${destroot}${prefix}/include && \
-		ln -sf ${prefix}/Library/Frameworks/Python.framework/Versions/3.0/include/python3.0"
+        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
 
-	# 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 "
+        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 python-config } {
+            file delete ${destroot}${prefix}/bin/${bin}
+        }
+        foreach bin [list python${branch} pythonw${branch} idle${branch} pydoc${branch} smtpd${branch}.py python${branch}-config] {
+            file rename -force ${destroot}${framewdir}/bin/${bin} ${destroot}${prefix}/bin
+            ln -s ${destroot}${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}/python[string map {. {}} ${branch}] ${destroot}${prefix}/etc/select/python/
 }
 
+# TODO: better message, how to install python_select etc.
 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"
 }
 
-livecheck.check		regex
-livecheck.url		http://www.python.org/download/releases/3.0/
-livecheck.regex		/3.0/Python-(\[0-9a-z.\]+)\\.tgz
+variant universal {
+        configure.args-append           --enable-universalsdk
+}
+
+livecheck.check         regex
+livecheck.url           ${homepage}download/releases/
+livecheck.regex         Python (${branch}a\[0-9\]+)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080609/43a12c57/attachment.htm 


More information about the macports-changes mailing list