Skip to content

Commit

Permalink
Python: disable user site-packages in setup hook
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
FRidh committed Dec 30, 2017
1 parent 2d0bead commit 5920579
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkgs/development/interpreters/python/setup-hook.sh
Expand Up @@ -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;

0 comments on commit 5920579

Please sign in to comment.