Python 3.1.1 on Mac OS X 10.6 Snow Leopard

I spent some time today playing around with getting the source for python 3.1.1 to build on my MacBook Pro using the --enable-framework and --enable-universalsdk options with no success. I humbly admit that I have no real idea why I can't compile 3.1.1 on Snow Leopard, I definitely got a new version of Xcode for Snow Leopard and made sure that I also installed the 10.4u SDK. It seems to be choking on the 10.4 SDK during the make stage and has a few bugs regarding the headers for wchar, cursor and ncursor during the configuration pass. I was able to get make from a simple config, and most of the test passes, but it just isn't hard enough. Has anyone else tried to build python 3.1.1 on Mac using Snow Leopard

+2


source to share


4 answers


There is an automatic installer here: http://python.org/ftp/python/3.1.1/python-3.1.1.dmg



+3


source


You need to set MACOSX_DEPLOYMENT_TARGET if you really want to use the old SDK.



If you configure 10.6, it is possible that PPC creation is no longer supported, according to this bug report . In fact, this can be the case even if you are targeting 10.4 using XCode 3.2 (haven't tried it yourself).

+1


source


I don't have 10.6, but I can't say for sure that it will work without problems, but in general, if you want to build a framework built into the framework optimized for 10.6 Python on OS X, you're best off using the installer build script in in the source tree Mac/BuildScript/build-installer.py

after applying the patch in the bug report. Martin referred to, Something like this should work [untested]:

... /build-installer.py --sdk-path=/Developer/SDKs/MacOSX10.6.sdk --universal-archs=intel --dep-target=10.6 --src-dir=... --build-dir=...

This will build everything, including dependent third-party libraries and documentation, but be warned, you probably have to tweak everything until it works out right, and some things are not yet supported in 64-bit, primarily tkinter. As mentioned above, the standard python.org 3.1.1 installer should work fine unless you need 64-bit support.

[EDIT: I have to clarify that there is 64-bit support for WRT, the problem is not tkinter, but that the Apple-supplied versions of Tk in 10.5 and earlier were only 32-bit and so the code in the setup was set. py to prevent trying to build a 64-bit version of tkinter on OSX. Perhaps this check can be removed now if 10.6 Tk is 64-bit.]

+1


source


Kenneth Reits' soliton doesn't work for me. In fact, the installation works fine, but my default PATH

still points to /usr/bin/python

(v2.6.1.). I vaguely remember that we should change our ~/.profile

to /.../Frameworks

, and I expected the installer to do it for me (no).

It /Library/Frameworks/Python.framework/Versions/3.1/bin

exists anyway , so we can add it. But I am curious why the python bar is crashing and burning there.

No time to work it out now. Bye.

0


source







All Articles