[MacPorts] #16334: RFE: Make Python more Framework Friendly

MacPorts noreply at macports.org
Sun Aug 17 23:08:08 PDT 2008


#16334: RFE: Make Python more Framework Friendly
-----------------------------------+----------------------------------------
 Reporter:  mcalhoun at macports.org  |       Owner:  macports-tickets at lists.macosforge.org
     Type:  enhancement            |      Status:  new                                  
 Priority:  Normal                 |   Milestone:  Port Enhancements                    
Component:  ports                  |     Version:  1.6.0                                
 Keywords:                         |  
-----------------------------------+----------------------------------------
 To ease the transition when python25 enabled the Framework option (in
 r37817),
 it was decided to move the actual library and include directories to
 ${prefix}/lib
 and ${prefix}/include respectively.
 {{{
 foreach dir { lib include } {
     file rename ${destroot}${framewdir}/${dir}/python${branch}
 ${destroot}${prefix}/${dir}
     ln -s ${prefix}/${dir}/python${branch}
 ${destroot}${framewdir}/${dir}/python${branch}
 }
 }}}

 This can cause a problem because some scripts ask python directly where
 the library directory is.
 Python believes that the library directory is on the Framework directory.
 There is a discussion on the mailing list
 [http://lists.macosforge.org/pipermail/macports-dev/2008-July/005603.html
 on this problem].

 We can put the effort into making ports work with the current python
 setup, but I humbly suggest that a better long term solution is to
 to modify the various ports to install into the Framework directory.

 Attached is a proposed change to the python25 Portfile as well as the
 python25 group.

 The advantages are:
    * The python program will not have the wrong library path.
    * It is much easier to avoid conflicts between the versions of python.

 The main disadvantage is that many ports will have to be modified (only
 minor changes, however, are often sufficient).

 Of the py25-* ports I have tested, the most common changes required are
 along the lines of:
 {{{
 configure.pre_args-delete  --prefix=${prefix}
 set python_prefix
 ${prefix}/Library/Frameworks/Python.framework/Versions/2.5
 configure.pre_args-append  --prefix=${python_prefix}
 configure.args-append      --includedir=${python_prefix}/include/python2.5
 configure.env-append PKG_CONFIG_PATH=${python_prefix}/lib/pkgconfig
 }}}

-- 
Ticket URL: <http://trac.macports.org/ticket/16334>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list