[Python-Dev] Wrong OSX platform in sysconfig.py causing installation problems (original) (raw)
Chris Barker chris.barker at noaa.gov
Sun May 8 01:59:16 EDT 2016
- Previous message (by thread): [Python-Dev] Wrong OSX platform in sysconfig.py causing installation problems
- Next message (by thread): [Python-Dev] Wrong OSX platform in sysconfig.py causing installation problems
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, May 6, 2016 at 10:43 AM, Joseph Lee Nunn III <josephnunn at gmail.com> wrote:
Then I have found the right list to post on, for my problem is a bug in the Python 3.5.1 distribution. Albeit one which will only manifest in certain situations.
The presence of numerous
-isysroot /Developer/SDKs/MacOSX10.6.sdk
directives in the following file/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/sysconfigdata.py
As I understand it, that is all there so that when extensions are built, they are linked against that SDK -- so you can build extensions that can then be run on any system 10.6 and greater.
Will cause errors for people who have kept around the old /Developer directory tree, and old SDKs like 10.6, for building backwards compatible old code.
what are the errors -- wouldn't the old SDK be found, and used, and that's exactly what's intended?
Newer versions of the SDKs are now kept inside the Xcode application itself. And then they will only have a problem when trying to install a package with C extensions,
well, sure. of course this is an issue for building C extensions.
which in my case was Persistence, a dependency of ZODB. And even more so, ONLY when trying to pip install said package into a virtual environment created by 3.5’s pyvenv command, if installing the package into the system wide Python there will be no error.
hmm, As I understand it the building process should be exactly the same whether you are on a virtualenv or not. but if so -- maybe the "solution" is to build a wheel outside virtualenv, and then install that wheel in the virtualenv. But I agree, it should work, of course.
You see the -isysroot flag has the unusual behavior where instead of reporting an error when it cannot find the newly specified system root it simply has no effect. So if you don’t have the SDK specified in the location specified then the flag does nothing, as I assume is the case for 99% of people.
Indeed, that's been working fine for me for a while. However it's this behavior that is actually the bug -- extensions are supposed to be build against the 10.6 SDK -- and that's not what's happening in this case
I understand the need to make Python 3.5 backwards compatible, but doing it this way would appear to have the side effect of breaking the ability to install packages using C extensions in virtual environments, or at least it did for me.
It does sound like you've hit a bug, but I actually think you've misidentified the bug -- I'm trying to understand why it's not working in a virtualenv -- THAT's the bug.
And I have no idea what to do about it -- thanks Apple for moving things -- that's a great way to keep backward compatibility!
Ned: I'm trying to explore this a bit now (on a 10.9 system), so I followed the instructions in the Python developers guide, and did:
xcode-select --install
And was a bit surprised that It did a substantial download -- I thought I already had the XCode command line tools -- but whatever. After running that, I found I had the 10.9 and 10.10 SDKs (I think that installed the 10.10 one, I previously had only 10.9). And they are buried deep in XCode.app ....
OK, but how would I go about getting the 10.6 SDK??? This SO post:
http://stackoverflow.com/questions/11989007/where-to-get-macos-sdk-10-6-for-xcode
indicates that it's a serious pain in the $%^% -- thank Apple! But, as far as I can tell, if you install an old XCode, you will get the older SDKs, and installed into the old location.
(this is why I kept a 10.6 system around for a long time -- to build python extensions...)
But what should we do? IF you are building extensions only for yourself, then I think whatever the heck SDK you have will work fine -- but how to build for distribution?
.... Trying to decide if I want to go through the hassle of installing an old XCode to see if i can replicate the bug the OP is reporting....
-CHB
https://docs.python.org/devguide/setup.html#build-dependencies
> > Installing Xcode by itself is not sufficient. The sysroot and flag values you note in sysconfigdata.py are normal and there for compatibility with installing on older versions of OS X; they should not cause a problem on newer releases. For what it's worth, I was able to install ZODB with the current python.org 3.5.1 on OS X 10.11.4 using either venv or virtualenv. > > Good luck! > > --Ned > > P.S. Mailing list info is available here: https://mail.python.org. The bug tracker is here: https://bugs.python.org > > -- > Ned Deily > nad at python.org -- [] >
Python-Dev mailing list Python-Dev at python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/chris.barker%40noaa.gov
--
Christopher Barker, Ph.D. Oceanographer
Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20160507/c3bd4bf8/attachment.html>
- Previous message (by thread): [Python-Dev] Wrong OSX platform in sysconfig.py causing installation problems
- Next message (by thread): [Python-Dev] Wrong OSX platform in sysconfig.py causing installation problems
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]