Merge pull request #27799 from FRidh/nosite
Python: disable user site-packages for programs and environments.
This commit is contained in:
commit
6341cc9101
@ -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.
|
||||
|
@ -29,7 +29,7 @@ let
|
||||
for prg in *; do
|
||||
if [ -f "$prg" ]; then
|
||||
rm -f "$out/bin/$prg"
|
||||
makeWrapper "$path/bin/$prg" "$out/bin/$prg" --set PYTHONHOME "$out"
|
||||
makeWrapper "$path/bin/$prg" "$out/bin/$prg" --set PYTHONHOME "$out" --set PYTHONNOUSERSITE "true"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user