[zsh] Conditionally load python stuff
This commit is contained in:
parent
f84c4d0400
commit
0b84b749de
1 changed files with 8 additions and 4 deletions
12
env.darwin
12
env.darwin
|
@ -1,12 +1,15 @@
|
||||||
# vim: set ft=zsh:
|
# vim: set ft=zsh:
|
||||||
# Eryn Wells <eryn@erynwells.me>
|
# Eryn Wells <eryn@erynwells.me>
|
||||||
|
|
||||||
for f in `ls "$HOME/Library/Python"`; do
|
pythonroot="$HOME/Library/Python"
|
||||||
prepend-to-path "$HOME/Library/Python/$f/bin"
|
if [[ -d "$pythonroot" ]]; then
|
||||||
done
|
for f in `ls "$pythonroot"`; do
|
||||||
|
prepend-to-path "$pythonroot/$f/bin"
|
||||||
|
done
|
||||||
|
fi
|
||||||
prepend-to-path "/usr/local/go/bin"
|
prepend-to-path "/usr/local/go/bin"
|
||||||
|
|
||||||
py27local="$HOME/Library/Python/2.7/lib/python/site-packages"
|
py27local="$pythonroot/2.7/lib/python/site-packages"
|
||||||
if [[ -d "$py27local" ]]; then
|
if [[ -d "$py27local" ]]; then
|
||||||
if [[ ! -z $PYTHONPATH ]]; then
|
if [[ ! -z $PYTHONPATH ]]; then
|
||||||
PYTHONPATH=$py27local:$PYTHONPATH
|
PYTHONPATH=$py27local:$PYTHONPATH
|
||||||
|
@ -15,4 +18,5 @@ if [[ -d "$py27local" ]]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
unset py27local
|
unset py27local
|
||||||
|
unset pythonroot
|
||||||
export PYTHONPATH
|
export PYTHONPATH
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue