Revert "python: Move catch_conflicts.py into subdirectory (#23600)" (#24528)

This reverts commit 76213d102c.
This commit is contained in:
Vladimír Čunát 2017-04-01 12:20:31 +02:00 committed by GitHub
parent 76213d102c
commit 46ea770b2b
3 changed files with 5 additions and 17 deletions

View file

@ -1,13 +0,0 @@
catch_conflicts.py
==================
The file catch_conflicts.py is in a subdirectory because, if it isn't, the
/nix/store/ directory is added to sys.path causing a delay when building.
Pointers:
- https://docs.python.org/3/library/sys.html#sys.path
- https://github.com/NixOS/nixpkgs/pull/23600

View file

@ -79,10 +79,9 @@ python.stdenv.mkDerivation (builtins.removeAttrs attrs ["disabled"] // {
postFixup = '' postFixup = ''
wrapPythonPrograms wrapPythonPrograms
'' + lib.optionalString catchConflicts '' '' + lib.optionalString catchConflicts ''
# Check if we have two packages with the same name in the closure and fail. # check if we have two packages with the same name in closure and fail
# If this happens, something went wrong with the dependencies specs. # this shouldn't happen, something went wrong with dependencies specs
# Intentionally kept in a subdirectory, see catch_conflicts/README.md. ${python.interpreter} ${./catch_conflicts.py}
${python.interpreter} ${./catch_conflicts}/catch_conflicts.py
'' + attrs.postFixup or ''''; '' + attrs.postFixup or '''';
passthru = { passthru = {
@ -99,3 +98,5 @@ python.stdenv.mkDerivation (builtins.removeAttrs attrs ["disabled"] // {
isBuildPythonPackage = python.meta.platforms; isBuildPythonPackage = python.meta.platforms;
}; };
}) })