Created
February 16, 2010 14:22
-
-
Save rwest/305551 to your computer and use it in GitHub Desktop.
put this in setup.py to avoid compiling ppc binaries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Stop wasting my time compiling PowerPC-compatible C extensions on my intel Mac | |
import distutils.sysconfig | |
config = distutils.sysconfig.get_config_vars() | |
for key,value in config.iteritems(): | |
location = str(value).find('-arch ppc') | |
if location>=0: | |
print "removing '-arch ppc' from %s"%(key) | |
config[key] = value.replace('-arch ppc ','') | |
# Tip from Lisandro Dalcin: | |
# FYI, in Py>=2.6 the ARCHFLAGS environ var is honored by distutils, so | |
# you should be able to | |
# export ARCHFLAGS='-arch i386' # or '-arch x86_64' | |
# and get your job done. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment