I am attempting to build a python application with binary modules on OS X. I want to build versions for Snow Leopard and Leopard from Lion. I have XCode 4 installed with the 10.5 and 10.6 sdks and have been attempting to build using the MACOSX_DEPLOYMENT_TARGET flag set to 10.6. I receive an error from distutils complaining that python was built with a different deployment target.
I tried building a separate python binary with the deployment target set to 10.6 and then used virtualenv to try to build from that, but virtualenv expected a lib directory under the base env directory that was not there.
I am a total newb at developing on Mac and not even sure if what I want to do is possible. Am I going to have to break down and have someone still running Snow Leopard build my distributions?
I really appreciate any assistance.
The system Pythons shipped by Apple in OS X 10.7 are built for 10.7 only. The simplest solution is to download the most recent Python 2.7 or 3.2 64-bit/32-bit installer from python.org and use it since it is a universal binary that will run on either 10.6 or 10.7. If you are making an app bundle, you'll need to install a copy of py2app
for it and any other 3rd-party packages like Distribute
(aka easy_install
) or pip
.