mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 07:31:26 +00:00
Python: wrapPythonPrograms: only wrap in $out/bin
Thus far all executables in a derivation were wrapped. This commit only wraps executables in $out/bin. If other scripts need to be wrapped as well, then one can use wrapPythonProgramsIn.
This commit is contained in:
parent
dc2250eb5e
commit
c10af9e744
@ -1,7 +1,7 @@
|
||||
# Wrapper around wrapPythonProgramsIn, below. The $pythonPath
|
||||
# variable is passed in from the buildPythonPackage function.
|
||||
wrapPythonPrograms() {
|
||||
wrapPythonProgramsIn $out "$out $pythonPath"
|
||||
wrapPythonProgramsIn "$out/bin" "$out $pythonPath"
|
||||
}
|
||||
|
||||
# Builds environment variables like PYTHONPATH and PATH walking through closure
|
||||
@ -47,6 +47,7 @@ wrapPythonProgramsIn() {
|
||||
buildPythonPath "$pythonPath"
|
||||
|
||||
# Find all regular files in the output directory that are executable.
|
||||
if [ -d "$dir" ]; then
|
||||
find "$dir" -type f -perm -0100 -print0 | while read -d "" f; do
|
||||
# Rewrite "#! .../env python" to "#! /nix/store/.../python".
|
||||
# Strip suffix, like "3" or "2.7m" -- we don't have any choice on which
|
||||
@ -75,6 +76,7 @@ wrapPythonProgramsIn() {
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
# Adds the lib and bin directories to the PYTHONPATH and PATH variables,
|
||||
|
Loading…
Reference in New Issue
Block a user