[Pythonmac-SIG] building universal binaries
bob at redivi.com
Thu Jan 26 00:23:01 CET 2006
On Jan 25, 2006, at 2:59 PM, bear wrote:
> Kevin Ollivier wrote:
>> How exactly are you doing this? Are you passing these flags into
>> configure, or editing the configure script? I'm seeing that it does
>> matter where in the configure script the options are added. From my
>> tests so far, the test 'failures' in the configure script are
>> incorrect - it seems these options just trip up the tests somehow. (I
>> think, for example, the multi-architecture flags don't work with
>> for a "dry run" compile from what I've read) I've found that for wx,
>> adding the options after these tests worked correctly.
> That's the difference then - I'm setting the env vars and letting
> configure do it's thing. I don't control the configure script and was
> trying to see if I could build with minimal patching.
>> I've found that without the -isysroot, it creates/links "single
>> architecture" objects even when multiple -arch flags are specified.
>> ;-/ So you'll need to be able to specify those flags but after the
>> basic tests are run. At least, that's how I was able to succeed
>> with wx.
> That does help a lot - let me first hack the script and then pass
> upstream any changes I've had to make.
One thing to note is that you can probably build with minimal
patching (via the universal SDK), but the result will only run on Mac
OS X 10.4 and later. It requires major patching in order to create a
Python binary that is Mac OS X 10.3 or 10.2 compatible.
Additionally, you'll end up with a Python that has these SDK-build
flags baked into its Makefile, so it's not ideally distributable --
because building extensions would require having the SDK(s)
installed... but perhaps that's not a terrible idea, to have a
separate distribution of Python designed for building redistributable
applications. It would certainly be easier than trying to make
distutils and autoconf smart.
More information about the Pythonmac-SIG