[PATCH to review] Treat python25 as a framework Python

Blair Zajac blair at orcaware.com
Sat Aug 18 22:47:38 PDT 2012


python-1.0.tcl and python25-1.0.tcl treat Python 2.5 like 2.4, that is, a 
non-framework build, but on my systems, it's a framework build.  Any problems in 
updating the two to treat 2.5 like 2.6 and above?  I'm thinking of using the 
below patch.  This will let me build the py-zeroc-ice modules that look for a 
Framework structure.

Thanks,
Blair
-------------- next part --------------
Index: python-1.0.tcl
===================================================================
--- python-1.0.tcl	(revision 96775)
+++ python-1.0.tcl	(working copy)
@@ -210,7 +210,7 @@
         prefix {
             global build_arch frameworks_dir
             set ret "${frameworks_dir}/Python.framework/Versions/${python.branch}"
-            if {${python.version} == 25 || (${python.version} == 24 && 
+            if {(${python.version} == 24 && 
                 ![file isfile ${ret}/include/python${python.branch}/Python.h] &&
                 ([file isfile ${prefix}/include/python${python.branch}/Python.h]
                 || [string match *64* $build_arch]))} {
@@ -226,7 +226,7 @@
             }
         }
         lib {
-            if {${python.version} != 24 && ${python.version} != 25} {
+            if {${python.version} != 24} {
                 return "${python.prefix}/Python"
             } else {
                 return "${prefix}/lib/lib${python.branch}.dylib"
@@ -254,14 +254,14 @@
             }
         }
         link_binaries {
-            if {${python.version} != 24 && ${python.version} != 25} {
+            if {${python.version} != 24} {
                 return yes
             } else {
                 return no
             }
         }
         move_binaries {
-            if {${python.version} == 24 || ${python.version} == 25} {
+            if {${python.version} == 24} {
                 return yes
             } else {
                 return no
Index: python25-1.0.tcl
===================================================================
--- python25-1.0.tcl	(revision 96775)
+++ python25-1.0.tcl	(working copy)
@@ -33,11 +33,12 @@
 #
 
 set python.branch	2.5
-set python.bin		${prefix}/bin/python${python.branch}
-set python.lib		${prefix}/lib/libpython${python.branch}.dylib
-set python.libdir	${prefix}/lib/python${python.branch}
-set python.pkgd		${prefix}/lib/python${python.branch}/site-packages
-set python.include	${prefix}/include/python${python.branch}
+set python.prefix	${frameworks_dir}/Python.framework/Versions/${python.branch}
+set python.bin		${python.prefix}/bin/python${python.branch}
+set python.lib		${python.prefix}/Python
+set python.libdir	${python.prefix}/lib/python${python.branch}
+set python.pkgd		${python.prefix}/lib/python${python.branch}/site-packages
+set python.include	${python.prefix}/include/python${python.branch}
 
 categories		python
 


More information about the macports-dev mailing list