-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Closed
Labels
6.topic: pythonPython is a high-level, general-purpose programming language.Python is a high-level, general-purpose programming language.
Description
Currently python packages in propagatedBuildInputs are included into PYTHONPATH and are referenced by a file in the output (propagated-build-native-inputs), which makes them run-time dependencies:
_addToPythonPath() {
local dir="$1"
if [ -n "${pythonPathsSeen[$dir]}" ]; then return; fi
pythonPathsSeen[$dir]=1
addToSearchPath program_PYTHONPATH $dir/lib/@libPrefix@/site-packages
addToSearchPath program_PATH $dir/bin
local prop="$dir/nix-support/propagated-build-native-inputs"
if [ -e $prop ]; then
local i
for i in $(cat $prop); do
_addToPythonPath $i
done
fi
}
For ELF programs nix can figure out the run-time dependencies by scanning the executables, this fails for python as the dependencies are not referenced in any file.
DISCUSSION:
- pth files could include such references and would handle PYTHONPATH manipulation
- a nix-support/python-build-inputs could list python buildInputs, turning them into run-time dependencies and further they would be used in the above _addToPythonPath
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
6.topic: pythonPython is a high-level, general-purpose programming language.Python is a high-level, general-purpose programming language.