From 3ff2d9362ce18cab4bebd6ebf17892e431df34e2 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Mon, 19 Sep 2022 10:01:25 +0200 Subject: [PATCH] Revert "buildPython*: wrap setuptools in hook for catching conflicts" Revert for now and fix on python-unstable branch. This reverts commit 13bb0f49f7afe8296452d70e7782ac1d67b064da. --- pkgs/development/interpreters/python/hooks/default.nix | 3 ++- .../interpreters/python/hooks/python-catch-conflicts-hook.sh | 2 +- pkgs/development/interpreters/python/mk-python-derivation.nix | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) 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 "")) [