wrapPythonProgram: exclude Python itself from PYTHONPATH
This commit is contained in:
parent
adafdb88f5
commit
837cf416ce
@ -17,6 +17,8 @@ buildPythonPath() {
|
|||||||
declare -A pythonPathsSeen=()
|
declare -A pythonPathsSeen=()
|
||||||
program_PYTHONPATH=
|
program_PYTHONPATH=
|
||||||
program_PATH=
|
program_PATH=
|
||||||
|
pythonPathsSeen["@python@"]=1
|
||||||
|
addToSearchPath program_PATH @python@/bin
|
||||||
for path in $pythonPath; do
|
for path in $pythonPath; do
|
||||||
_addToPythonPath $path
|
_addToPythonPath $path
|
||||||
done
|
done
|
||||||
|
@ -42,6 +42,7 @@ in modules // {
|
|||||||
{ deps = pkgs.makeWrapper;
|
{ deps = pkgs.makeWrapper;
|
||||||
substitutions.libPrefix = python.libPrefix;
|
substitutions.libPrefix = python.libPrefix;
|
||||||
substitutions.executable = python.interpreter;
|
substitutions.executable = python.interpreter;
|
||||||
|
substitutions.python = python;
|
||||||
substitutions.magicalSedExpression = let
|
substitutions.magicalSedExpression = let
|
||||||
# Looks weird? Of course, it's between single quoted shell strings.
|
# Looks weird? Of course, it's between single quoted shell strings.
|
||||||
# NOTE: Order DOES matter here, so single character quotes need to be
|
# NOTE: Order DOES matter here, so single character quotes need to be
|
||||||
|
Loading…
Reference in New Issue
Block a user