From 130e063a3d7f2728ca65046e7a6164184db1f1f6 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Sun, 20 Aug 2023 23:45:47 -0700 Subject: [PATCH] pypaInstallHook: enter "dist" directory before installing (#250464) --- .../interpreters/python/hooks/pypa-install-hook.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/python/hooks/pypa-install-hook.sh b/pkgs/development/interpreters/python/hooks/pypa-install-hook.sh index 1a7b30116904..2d925742daa7 100644 --- a/pkgs/development/interpreters/python/hooks/pypa-install-hook.sh +++ b/pkgs/development/interpreters/python/hooks/pypa-install-hook.sh @@ -5,10 +5,15 @@ pypaInstallPhase() { echo "Executing pypaInstallPhase" runHook preInstall - for wheel in dist/*.whl; do + pushd dist > /dev/null + + for wheel in *.whl; do @pythonInterpreter@ -m installer --prefix "$out" "$wheel" + echo "Successfully installed $wheel" done + popd > /dev/null + export PYTHONPATH="$out/@pythonSitePackages@:$PYTHONPATH" runHook postInstall