From: W. Trevor King Date: Thu, 17 Jun 2010 19:18:03 +0000 (-0400) Subject: Automatically adjust PYTHONPATH for locally installed Python version. X-Git-Tag: v0.3~72 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8879e67be743c8b1caee05c6098d3d6387461242;p=dotfiles-framework.git Automatically adjust PYTHONPATH for locally installed Python version. --- diff --git a/_bashrc b/_bashrc index 35ebae2..ffc398d 100644 --- a/_bashrc +++ b/_bashrc @@ -14,7 +14,8 @@ export LD_LIBRARY_PATH=~/lib export TEXINPUTS=":.:$HOME/projects/latex/common/" # personalize python path -export PYTHONPATH=".:$HOME/lib/python:$HOME/lib/python2.5/site-packages:$HOME/.python" +PYTHON_VERSION=$(python -c 'import sys; print ".".join([str(i) for i in sys.version_info[:2]])') +export PYTHONPATH=".:$HOME/lib/python:$HOME/lib/python$PYTHON_VERSION/site-packages:$HOME/.python" # append personal manpages to manpath export MANPATH=":$HOME/share/man"