python: make it possible to disable the python setup-hook

Without this it's impossible to use a python binary that depends on a
different python version than what's used during the current build.
This commit is contained in:
Daiderd Jordan 2019-03-05 20:25:38 +01:00 committed by Frederik Rietdijk
parent 8fa36fc8a1
commit a76e11a8c5

View file

@ -12,7 +12,9 @@ toPythonPath() {
echo $result
}
addEnvHooks "$hostOffset" addPythonPath
if [ -z "${dontAddPythonPath:-}" ]; then
addEnvHooks "$hostOffset" addPythonPath
fi
# Determinism: The interpreter is patched to write null timestamps when compiling python files.
# This way python doesn't try to update them when we freeze timestamps in nix store.