On 19 Oct, 2009, at 23:20, Robert Kern wrote:
On 2009-10-19 15:59 PM, Ronald Oussoren wrote:On 19 Oct, 2009, at 22:47, Chris Fonnesbeck wrote:Is there any way of convincing setuptools to *not* build for PPC? Forsome reason, it tries to build a universal binary by default:g++ -arch i386 -arch ppc -isysroot /Developer/SDKs/ MacOSX10.4u.sdk ...etcWhich results in errors: ld warning: in/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/ Python.framework/Versions/4.3.0/lib/libz.dylib,file is not of required architecture ld: in/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/ Python.framework/Versions/4.3.0/lib/libz.1.dylib,file is not of required architecture for architecture ppc I have no interest in building universals -- how can I switch this off? I already tried putting "-arch i386" in my LDFLAGS, but to no avail.Edit /Library/Frameworks/.../lib/python2.5/config/Makefile to remove the occurrences of "-arch ppc" if you never want to build PPC versions of stuff again. More recent versions of EPD should have that done already.
Patching the installation is evil.
Add ['-arch', 'i386'] to both extra_compile_args and extra_link args ofthe Extension objects.Will that get rid of the pre-existing "-arch ppc" flags?
Yes. Distutils assumes that you know what you're doing when you specify a -arch flag and strips all existing -arch flags from the default flags. Likewise for -isysroot, if you specify that the existing one will be removed automaticly.
BTW. The path's in the error-messages above are fishy, there shouldn'tbe a '4.3.0' version in Python.framework.I presume he's using the Enthought Python Distribution (disclosure: I work for Enthought), which does have such a version number. It's basically a not-entirely-palatable hack to make sure that users can install and uninstall EPD in order to try it out without breaking their previously installed Pythons.
Wouldn't it be better to use '--with-framework-name', IIRC I introduced that in 2.6:
./configure --enable-framework --with-framework-name=EPDThis will create a framework named 'EPD.framework' instead of 'Python.framework'.
Ronald
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig