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:
Johannes Bornhold
2017-04-01 12:19:53 +02:00
committed by Vladimír Čunát
parent eb551a435f
commit 249b34aadc
3 changed files with 17 additions and 5 deletions

View File

@@ -0,0 +1,13 @@
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