Skip to content

Instantly share code, notes, and snippets.

@ulope
Created July 13, 2020 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ulope/7b4fecdd2493fb6e43662393910c93f3 to your computer and use it in GitHub Desktop.
Save ulope/7b4fecdd2493fb6e43662393910c93f3 to your computer and use it in GitHub Desktop.
Pythonz shell RC config for macOS
if [ ! -f /tmp/brew-prefix ]; then
echo -n $(brew --prefix) > /tmp/brew-prefix
fi
if [ ! -f /tmp/brew-prefix-openssl ]; then
echo -n $(brew --prefix openssl) > /tmp/brew-prefix-openssl
fi
if [ ! -f /tmp/brew-prefix-readline ]; then
echo -n $(brew --prefix readline) > /tmp/brew-prefix-readline
fi
if [ ! -f /tmp/xcode-sdk-prefix ]; then
echo -n $(xcrun --show-sdk-path) > /tmp/xcode-sdk-prefix
fi
[[ -s $HOME/.pythonz/etc/bashrc ]] && source $HOME/.pythonz/etc/bashrc || echo Pythonz integration missing
alias pythonz="LDFLAGS=\"-L$(</tmp/brew-prefix-openssl)/lib -L$(</tmp/brew-prefix-readline)/lib\" CFLAGS=\"-I$(</tmp/brew-prefix-openssl)/include -I$(</tmp/brew-prefix-readline)/include -I$(</tmp/xcode-sdk-prefix)/usr/include -I$(</tmp/xcode-sdk-prefix)/System/Library/Frameworks/Tk.framework/Headers/X11\" PKG_CONFIG_PATH=\"$(</tmp/brew-prefix-openssl)/lib/pkgconfig:$(</tmp/brew-prefix-readline)/lib/pkgconfig\" pythonz"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment