Ned Deily <n...@acm.org> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11623>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to