diff --git a/pkgs/development/interpreters/python/hooks/default.nix b/pkgs/development/interpreters/python/hooks/default.nix index 903ad0215cdf..5d605b240ad8 100644 --- a/pkgs/development/interpreters/python/hooks/default.nix +++ b/pkgs/development/interpreters/python/hooks/default.nix @@ -92,8 +92,9 @@ in rec { pythonCatchConflictsHook = callPackage ({ setuptools }: makeSetupHook { name = "python-catch-conflicts-hook"; + deps = [ setuptools ]; substitutions = { - inherit pythonInterpreter pythonSitePackages setuptools; + inherit pythonInterpreter; catchConflicts=../catch_conflicts/catch_conflicts.py; }; } ./python-catch-conflicts-hook.sh) {}; diff --git a/pkgs/development/interpreters/python/hooks/python-catch-conflicts-hook.sh b/pkgs/development/interpreters/python/hooks/python-catch-conflicts-hook.sh index 0abcad3c42f2..374a2eddb407 100644 --- a/pkgs/development/interpreters/python/hooks/python-catch-conflicts-hook.sh +++ b/pkgs/development/interpreters/python/hooks/python-catch-conflicts-hook.sh @@ -2,7 +2,7 @@ echo "Sourcing python-catch-conflicts-hook.sh" pythonCatchConflictsPhase() { - PYTHONPATH="@setuptools@/@pythonSitePackages@:$PYTHONPATH" @pythonInterpreter@ @catchConflicts@ + @pythonInterpreter@ @catchConflicts@ } if [ -z "${dontUsePythonCatchConflicts-}" ]; then diff --git a/pkgs/development/interpreters/python/mk-python-derivation.nix b/pkgs/development/interpreters/python/mk-python-derivation.nix index a032c08d2a82..f37ad592cb49 100644 --- a/pkgs/development/interpreters/python/mk-python-derivation.nix +++ b/pkgs/development/interpreters/python/mk-python-derivation.nix @@ -121,7 +121,7 @@ let ensureNewerSourcesForZipFilesHook # move to wheel installer (pip) or builder (setuptools, flit, ...)? pythonRemoveTestsDirHook ] ++ lib.optionals catchConflicts [ - pythonCatchConflictsHook + setuptools pythonCatchConflictsHook ] ++ lib.optionals removeBinBytecode [ pythonRemoveBinBytecodeHook ] ++ lib.optionals (lib.hasSuffix "zip" (attrs.src.name or "")) [