mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-09-11 15:08:33 +01:00
suffix pythonpath
this is already the case for the pythonXYFull svn path=/nixpkgs/branches/stdenv-updates/; revision=32594
This commit is contained in:
parent
1d2e06e068
commit
eb35e3bd13
|
@ -30,10 +30,16 @@ wrapPythonProgramsIn() {
|
|||
sed -i "$i" -e "1 s^.*/env[ ]*python^#! $python^"
|
||||
fi
|
||||
|
||||
# PYTHONPATH is suffixed, PATH is prefixed. Reasoning:
|
||||
# PATH is set in the environment and our packages' bin need to
|
||||
# be chosen over the default PATH. PYTHONPATH is usually not
|
||||
# set, so we can use it to override the modules chosen at
|
||||
# install time. If we would want the same for PATH we could
|
||||
# introduce PATH_OVERWRITE or similar.
|
||||
if head -n1 "$i" | grep -q /python; then
|
||||
echo "wrapping \`$i'..."
|
||||
wrapProgram "$i" \
|
||||
--prefix PYTHONPATH ":" "$program_PYTHONPATH" \
|
||||
--suffix PYTHONPATH ":" "$program_PYTHONPATH" \
|
||||
--prefix PATH ":" $program_PATH
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue