Revert "Revert "buildPython*: wrap setuptools in hook for catching conflicts""

Most packages were fixed up on python-unstable branch.

This reverts commit 3ff2d9362c.
This commit is contained in:
Frederik Rietdijk 2022-09-20 09:49:27 +02:00
parent f1dcc2356b
commit 8895944c57
3 changed files with 3 additions and 4 deletions

View File

@ -92,9 +92,8 @@ in rec {
pythonCatchConflictsHook = callPackage ({ setuptools }:
makeSetupHook {
name = "python-catch-conflicts-hook";
deps = [ setuptools ];
substitutions = {
inherit pythonInterpreter;
inherit pythonInterpreter pythonSitePackages setuptools;
catchConflicts=../catch_conflicts/catch_conflicts.py;
};
} ./python-catch-conflicts-hook.sh) {};

View File

@ -2,7 +2,7 @@
echo "Sourcing python-catch-conflicts-hook.sh"
pythonCatchConflictsPhase() {
@pythonInterpreter@ @catchConflicts@
PYTHONPATH="@setuptools@/@pythonSitePackages@:$PYTHONPATH" @pythonInterpreter@ @catchConflicts@
}
if [ -z "${dontUsePythonCatchConflicts-}" ]; then

View File

@ -121,7 +121,7 @@ let
ensureNewerSourcesForZipFilesHook # move to wheel installer (pip) or builder (setuptools, flit, ...)?
pythonRemoveTestsDirHook
] ++ lib.optionals catchConflicts [
setuptools pythonCatchConflictsHook
pythonCatchConflictsHook
] ++ lib.optionals removeBinBytecode [
pythonRemoveBinBytecodeHook
] ++ lib.optionals (lib.hasSuffix "zip" (attrs.src.name or "")) [