Python: disable user site-packages for programs and environments.

Python by default checks a `site-packages` folder in the user's home
folder. We do not want such an impurity and therefore disable it.
Fixes #26846.
This commit is contained in:
Frederik Rietdijk
2017-07-31 13:16:29 +02:00
parent 740d76371e
commit 85a0ab4b23
2 changed files with 4 additions and 2 deletions

View File

@@ -66,7 +66,9 @@ wrapPythonProgramsIn() {
# above. The script will set PYTHONPATH and PATH variables.!
# (see pkgs/build-support/setup-hooks/make-wrapper.sh)
local -a wrap_args=("$f"
--prefix PATH ':' "$program_PATH")
--prefix PATH ':' "$program_PATH"
--set PYTHONNOUSERSITE "true"
)
# Add any additional arguments provided by makeWrapperArgs
# argument to buildPythonPackage.