This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ned.deily
Recipients James.Tatum, eric.araujo, jlindenbaum, ned.deily, ronaldoussoren, santoso.wijaya, ssbarnea, tarek
Date 2011-05-28.22:38:59
SpamBayes Score 2.7755576e-16
Marked as misclassified No
Message-id <1306622340.67.0.0692591604937.issue11623@psf.upfronthosting.co.za>
In-reply-to
Content
All that said, the best solution to the problem is to use an appropriately configured Python for the task at hand.  If you want to build Python executables that are compatible with older OS X versions and Mac hardware (in particular, all machines capable of running OS X 10.4, 10.5, and 10.6), then you should be using something like the traditional python.org 32-bit-only installer configuration (i386/ppc, deployment target=10.3). And to build that Python or extension modules for it on OS X 10.6, you need to have Xcode 3 installed.  End of story.

However, if you don't need that kind of backward compatibility - either you're just running on your own 10.6 (or later) system or are only targeting 10.6+ systems, then you should be using something like the python.org 64-/32- installer configuration (x86_64/i386, deployment target=10.6).  For that you should be able to build Python or extension modules with either Xcode 4 or Xcode 3.

If you are targeting for 10.5 Intel-only and above and want to use Xcode 4, you would need a Python with a slightly different configuration (i.e. with a 10.5 deployment target); we don't currently supply an installer that meets that specialized (and presumably rapidly diminishing) need for x86_64 on 10.5 but it isn't that difficult to build yourself if you really need it.

So, if you choose the right binary installer for the task, there *shouldn't* be any issues with using Xcode 4.  If you need to build a Python from source, make sure you do not use the default ./configure values.  In particular, explicitly set --enable-universalsdk, --with-universal-archs, and MACOSX_DEPLOYMENT_TARGET.  For example,

  ./configure \
      --enable-universalsdk=/Developer/SDKs/MacOSX10.6.sdk \
      --with-universal-archs=intel \
      --enable-framework \
      MACOSX_DEPLOYMENT_TARGET=10.6

and any other options you might want like:
     --prefix=/path/to/bin
     --enable-framework=/path/to/framework
     --with-framework-name=whatever
         #which also influences the /Applications directory name

And, yes, longer term, we should do provide more appropriate defaults for these newer environments.  As we don't have a lot of experience yet with Xcode 4 and 10.7 has not been released yet, feedback is appreciated.
History
Date User Action Args
2011-05-28 22:39:00ned.deilysetrecipients: + ned.deily, ronaldoussoren, tarek, eric.araujo, ssbarnea, santoso.wijaya, jlindenbaum, James.Tatum
2011-05-28 22:39:00ned.deilysetmessageid: <1306622340.67.0.0692591604937.issue11623@psf.upfronthosting.co.za>
2011-05-28 22:38:59ned.deilylinkissue11623 messages
2011-05-28 22:38:59ned.deilycreate