* Python 2.4.4.
* Added a setup hook for Python that adds Python packages in buildInputs to $PYTHONPATH. svn path=/nixpkgs/trunk/; revision=7338
This commit is contained in:
18
pkgs/development/interpreters/python/setup-hook.sh
Normal file
18
pkgs/development/interpreters/python/setup-hook.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
addPythonPath() {
|
||||
local p=$1/lib/python2.4/site-packages
|
||||
if test -d $p; then
|
||||
export PYTHONPATH="${PYTHONPATH}${PYTHONPATH:+:}$p"
|
||||
fi
|
||||
}
|
||||
|
||||
toPythonPath() {
|
||||
local paths="$1"
|
||||
local result=
|
||||
for i in $paths; do
|
||||
p="$i/lib/python2.4/site-packages"
|
||||
result="${result}${result:+:}$p"
|
||||
done
|
||||
echo $result
|
||||
}
|
||||
|
||||
envHooks=(${envHooks[@]} addPythonPath)
|
||||
Reference in New Issue
Block a user