summary refs log tree commit diff
path: root/pkgs/development/interpreters/python/setup-hook.sh
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2017-12-30 15:33:59 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2017-12-30 17:09:09 +0100
commit5920579a3dbdd2fddb9e60ff47029858e61fc53a (patch)
tree3cdb99231b26130dd1368b1a265a8cd030a9f2e7 /pkgs/development/interpreters/python/setup-hook.sh
parent2d0bead714eb5f99a08c54a3b25cd84379c251c2 (diff)
downloadnixpkgs-5920579a3dbdd2fddb9e60ff47029858e61fc53a.tar
nixpkgs-5920579a3dbdd2fddb9e60ff47029858e61fc53a.tar.gz
nixpkgs-5920579a3dbdd2fddb9e60ff47029858e61fc53a.tar.bz2
nixpkgs-5920579a3dbdd2fddb9e60ff47029858e61fc53a.tar.lz
nixpkgs-5920579a3dbdd2fddb9e60ff47029858e61fc53a.tar.xz
nixpkgs-5920579a3dbdd2fddb9e60ff47029858e61fc53a.tar.zst
nixpkgs-5920579a3dbdd2fddb9e60ff47029858e61fc53a.zip
Python: disable user site-packages in setup hook
Wrappers already included `PYTHONNOUSERSITE=1`, but now this env var is
also set in the Python setup hook. This improves purity in case of
non-sandboxes builds and nix-shell.
Diffstat (limited to 'pkgs/development/interpreters/python/setup-hook.sh')
-rw-r--r--pkgs/development/interpreters/python/setup-hook.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/python/setup-hook.sh b/pkgs/development/interpreters/python/setup-hook.sh
index dda9bed39f8..35726280a75 100644
--- a/pkgs/development/interpreters/python/setup-hook.sh
+++ b/pkgs/development/interpreters/python/setup-hook.sh
@@ -19,3 +19,6 @@ envHooks+=(addPythonPath)
 export DETERMINISTIC_BUILD=1;
 # Determinism: We fix the hashes of str, bytes and datetime objects.
 export PYTHONHASHSEED=0;
+# Determinism. Whenever Python is included, it should not check user site-packages.
+# This option is only relevant when the sandbox is disabled.
+export PYTHONNOUSERSITE=1;