Created
October 26, 2017 12:30
-
-
Save mnencia/7ac6e6e2487a54ecd1aaba876c925b41 to your computer and use it in GitHub Desktop.
Wrapper to use pyenv with homebrew and gnu binaries
This file contains hidden or 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
| #!/bin/sh | |
| # Add updated software from homebrew | |
| export CFLAGS="-I/usr/local/include" | |
| export LDFLAGS="-L/usr/local/lib" | |
| for pkg in openssl readline gdbm; do | |
| export CFLAGS="-I$(brew --prefix $pgk)/include $CFLAGS" | |
| export LDFLAGS="-L$(brew --prefix $pkg)/lib $LDFLAGS" | |
| done | |
| export PYTHON_CONFIGURE_OPTS="--enable-framework" | |
| # Remove gnu binaries from path | |
| export PATH=$(echo $PATH | sed 's/:/\n/g' | grep -v gnubin | paste -sd ":" -) | |
| pyenv install "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment