Last active
August 29, 2015 13:58
-
-
Save scw/9961407 to your computer and use it in GitHub Desktop.
wrap calls to pip to force usage of the GCC environment over Clang
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
# I've added this to my ~/.bash_profile to use it, you could also create a stand-alone shell script. | |
# Usage: pipx install cython | |
function pipx() { | |
# Many Python packages don't install correctly with clang, as mentioned here: | |
# https://gist.github.com/goldsmith/7262122 | |
# This wrapper forces gcc for pip installations: | |
export CFLAGS="-arch i386 -arch x86_64" | |
export FFLAGS="-m32 -m64" | |
export LDFLAGS="-Wall -undefined dynamic_lookup -bundle -arch i386 -arch x86_64" | |
export CC=gcc | |
export CXX="g++ -arch i386 -arch x86_64" | |
sudo -E pip "$@" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment