From f04278458be6f92d0a84605308b077438b968764 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Wed, 17 May 2023 12:19:52 +0200 Subject: [PATCH] Revert "python.pipInstallHook: avoid producing wrong direct_url.json file" Certain packages were failing since this was merged. https://github.com/NixOS/nixpkgs/pull/229472#issuecomment-1544410416 This reverts commit bff6c67911ed74cf560bd2b00fb1da32bd2fed63. --- .../development/interpreters/python/hooks/pip-install-hook.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/python/hooks/pip-install-hook.sh b/pkgs/development/interpreters/python/hooks/pip-install-hook.sh index f6fae14aa8d..a4f08b8b14c 100644 --- a/pkgs/development/interpreters/python/hooks/pip-install-hook.sh +++ b/pkgs/development/interpreters/python/hooks/pip-install-hook.sh @@ -10,7 +10,9 @@ pipInstallPhase() { mkdir -p "$out/@pythonSitePackages@" export PYTHONPATH="$out/@pythonSitePackages@:$PYTHONPATH" - @pythonInterpreter@ -m pip install $pname --find-links dist --no-index --no-warn-script-location --prefix="$out" --no-cache $pipInstallFlags + pushd dist || return 1 + @pythonInterpreter@ -m pip install ./*.whl --no-index --no-warn-script-location --prefix="$out" --no-cache $pipInstallFlags + popd || return 1 runHook postInstall echo "Finished executing pipInstallPhase"