[MacPorts] #13777: py25-numpy correction for Darwin 9 and Python Framework
#13777: py25-numpy correction for Darwin 9 and Python Framework ---------------------------------------------+------------------------------ Reporter: mdickens@nd.edu | Owner: macports-tickets@lists.macosforge.org Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Keywords: py25-numpy, Framework, Darwin 9 | ---------------------------------------------+------------------------------ If, somehow, one uses a Framework install of Python, then the PYTHONPATH isn't correct for the MacPorts site-packages ( /opt/local/lib/python2.5 /site-packages/ ) required to compile numpy. This patch adds the correct PYTHONPATH to the build and destroot environment. This will not be an issue if using the MacPorts non-Framework install of Python 2.5. But there are folks who need the Framework version (see, e.g. ticket:12817), and thus this correction is needed. -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/13777> MacPorts </projects/macports> Ports system for Mac OS
#13777: py25-numpy correction for Darwin 9 and Python Framework ------------------------------+--------------------------------------------- Reporter: mdickens@nd.edu | Owner: ram@macports.org Type: defect | Status: assigned Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: py25-numpy, Framework, Darwin 9 ------------------------------+--------------------------------------------- Changes (by ram@macports.org): * owner: macports-tickets@lists.macosforge.org => ram@macports.org * status: new => assigned -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/13777#comment:1> MacPorts </projects/macports> Ports system for Mac OS
#13777: py25-numpy correction for Darwin 9 and Python Framework ------------------------------+--------------------------------------------- Reporter: mdickens@nd.edu | Owner: ram@macports.org Type: defect | Status: assigned Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: py25-numpy, Framework, Darwin 9 ------------------------------+--------------------------------------------- Comment (by ram@macports.org): what is the error if this is not present for a framework python build? -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/13777#comment:2> MacPorts </projects/macports> Ports system for Mac OS
#13777: py25-numpy correction for Darwin 9 and Python Framework ------------------------------+--------------------------------------------- Reporter: mdickens@nd.edu | Owner: ram@macports.org Type: defect | Status: assigned Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: py25-numpy, Framework, Darwin 9 ------------------------------+--------------------------------------------- Comment (by mdickens@nd.edu): I don't have the exact text in front of me (in 10.4 right now), but the gist of the backtrace is: {{{ import md5
from hashlib import md5
tries to import _hashlib, but fails with
except: import _md5 }}}
This last command fails with an error that _md5 module cannot be found; this is not a "try:", but just a direct import. To explain why this happens, just a bit; I don't know why these scripts work on Darwin 8 and not 9, except that the PYTHONPATH must be set correctly on the former but not the latter: In python25's "setup.py" script (lines 570:587), if openssl version is > 0x00907000, then the _hashlib shared library will be built (if desired). If openssl version is <= 0x00907000, then the _md5 shared library will be built. As MacPorts has installed openssl "0.9.8g_0", hashlib is selected and md5 will not even be installed. The patch-setup.py for MacPorts Portfile disables the compilation of hashlib, but this is installed as a requisite for py25-numpy as py25-hashlib. By default (of the python25 group script), all of the py25-YYY ports will be installed into {{{${prefix}/lib/python25/site-packages}}} . The non-framework install of Python populates {{{${prefix}/lib/python25}}} and related sub-directories with the standard python scripts (text, compiled, and shared libraries). Under this version of Python, the PYTHONPATH will by default include {{{${prefix}/lib/python25/site- packages}}}, and thus adding this directory to the PYTHONPATH environment will not hurt but also won't change anything. The framework install of Python populates {{{${prefix}/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5}}} and related sub-directories with the standard python scripts (text, compiled, and shared libraries). Under this version of Python, the PYTHONPATH will by default include {{{${prefix}/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5 /site-packages}}}, but ''not'' {{{${prefix}/lib/python25/site-packages}}}, and thus adding this directory to the PYTHONPATH environment is required to access any packages installed by MacPorts. The .py files for hashlib and such will be installed in {{{${prefix}/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5}}}, while the shared library will be in {{{${prefix}/lib/python25/site- packages}}}. Thus the need for setting the PYTHONPATH, both internal to MacPorts Portfiles as well as in the user's environment (which, of course, is up to the user). Another possible solution would be to modify the python25 group settings to install py25-YYY packages into {{{${prefix}/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5}}} for the framework, and {{{${prefix}/lib/python25/site-packages}}} for the non-framework version ... I haven't looked into this, but it should be possible. -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/13777#comment:3> MacPorts </projects/macports> Ports system for Mac OS
#13777: py25-numpy correction for Darwin 9 and Python Framework ------------------------------+--------------------------------------------- Reporter: mdickens@nd.edu | Owner: ram@macports.org Type: defect | Status: assigned Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: py25-numpy, Framework, Darwin 9 ------------------------------+--------------------------------------------- Comment (by ram@macports.org): This issue has been brought up in #11267, one of the many tickets tracking the request for python25 to be a framework build... -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/13777#comment:4> MacPorts </projects/macports> Ports system for Mac OS
#13777: py25-numpy correction for Darwin 9 and Python Framework ------------------------------+--------------------------------------------- Reporter: mdickens@nd.edu | Owner: ram@macports.org Type: defect | Status: assigned Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: py25-numpy, Framework, Darwin 9 ------------------------------+--------------------------------------------- Comment (by mdickens@nd.edu): This ticket is not a request for a Python framework build, though that would be nice; yes I know about ticket #11267 and others ... I'm the submitter of the tarball on ticket #11267 that, at least for me, works for both framework and non-framework Python installs on both Darwin 8 and 9. I, for one, need framework Python install, and hope that whatever changes are needed to get that Port functional are made ASAP. This ticket is explaining why py25-numpy doesn't install correctly when using a Python framework under Darwin 9, and a patch to correct the issue. The changes in this patch do not affect Darwin 8 or prior, and won't change anything on Darwin 9 with a non-framework Python. All this patch does is, under Darwin 9, add {{{${prefix}/lib/python25/site-packages}}} to the PYTHONPATH for both build and destroot. Maybe I'm jumping the gun here, since maybe the eventual Python framework install's PYTHONPATH will be correct without any further additions. We won't know until a framework install is available. -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/13777#comment:5> MacPorts </projects/macports> Ports system for Mac OS
#13777: py25-numpy correction for Darwin 9 and Python Framework ------------------------------+--------------------------------------------- Reporter: mdickens@nd.edu | Owner: ram@macports.org Type: defect | Status: assigned Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: py25-numpy, Framework, Darwin 9 ------------------------------+--------------------------------------------- Comment (by ram@macports.org): Yes I know, I was just commenting that someone else has reported this very same issue, i.e. _md5 etc... not being found, in one of the comments for #11267 -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/13777#comment:6> MacPorts </projects/macports> Ports system for Mac OS
#13777: py25-numpy correction for Darwin 9 and Python Framework ------------------------------+--------------------------------------------- Reporter: mdickens@nd.edu | Owner: ram@macports.org Type: defect | Status: assigned Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: py25-numpy, Framework, Darwin 9 ------------------------------+--------------------------------------------- Comment (by ram@macports.org): I take it from http://trac.macosforge.org/projects/macports/ticket/11267#comment:17 that this change is no longer needed for the framework build of python25? -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/13777#comment:7> MacPorts </projects/macports> Ports system for Mac OS
#13777: py25-numpy correction for Darwin 9 and Python Framework ------------------------------+--------------------------------------------- Reporter: mdickens@nd.edu | Owner: ram@macports.org Type: defect | Status: assigned Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: | Keywords: py25-numpy, Framework, Darwin 9 ------------------------------+--------------------------------------------- Comment (by mdickens@nd.edu): Yes, that is correct. I was going to enter such a comment later tonight on this ticket, when I had more time; you beat me to it! Please go ahead and close out this ticket. Thanks for keeping on top of things! -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/13777#comment:8> MacPorts </projects/macports> Ports system for Mac OS
#13777: py25-numpy correction for Darwin 9 and Python Framework ------------------------------+--------------------------------------------- Reporter: mdickens@nd.edu | Owner: ram@macports.org Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.6.0 Resolution: invalid | Keywords: py25-numpy, Framework, Darwin 9 ------------------------------+--------------------------------------------- Changes (by ram@macports.org): * status: assigned => closed * resolution: => invalid Comment: closing as invalid as this problem is now fixed in the Framework build patch -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/13777#comment:9> MacPorts </projects/macports> Ports system for Mac OS
participants (1)
-
MacPorts