python: Move catch_conflicts.py into subdirectory (#23600)
Python does add the script's directory into "sys.path". For the case of
"catch_conflicts.py" this means "/nix/store" is added to "sys.path". This can
result in very long delays if the store contains a lot of entries.
(moved from master commit 76213d102c)
This commit is contained in:
committed by
Vladimír Čunát
parent
eb551a435f
commit
249b34aadc
@@ -79,9 +79,10 @@ python.stdenv.mkDerivation (builtins.removeAttrs attrs ["disabled"] // {
|
||||
postFixup = ''
|
||||
wrapPythonPrograms
|
||||
'' + lib.optionalString catchConflicts ''
|
||||
# check if we have two packages with the same name in closure and fail
|
||||
# this shouldn't happen, something went wrong with dependencies specs
|
||||
${python.interpreter} ${./catch_conflicts.py}
|
||||
# Check if we have two packages with the same name in the closure and fail.
|
||||
# If this happens, something went wrong with the dependencies specs.
|
||||
# Intentionally kept in a subdirectory, see catch_conflicts/README.md.
|
||||
${python.interpreter} ${./catch_conflicts}/catch_conflicts.py
|
||||
'' + attrs.postFixup or '''';
|
||||
|
||||
passthru = {
|
||||
@@ -98,5 +99,3 @@ python.stdenv.mkDerivation (builtins.removeAttrs attrs ["disabled"] // {
|
||||
isBuildPythonPackage = python.meta.platforms;
|
||||
};
|
||||
})
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user