From 12f9d8e7303af57ed2d462c17b772c36fd05d0ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 8 Oct 2022 10:15:02 +0200 Subject: [PATCH] buildPythonPackage: better error message if no setuptools is used. Before packages did not had to set `format = "other";` if had a custom installPhase and would not produce a dist folder. The current error message is hard to understand by new users: > Executing pythonOutputDistPhase > mv: cannot stat 'dist': No such file or directory This commit improves the error message. --- .../python/hooks/python-output-dist-hook.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/python/hooks/python-output-dist-hook.sh b/pkgs/development/interpreters/python/hooks/python-output-dist-hook.sh index e73e45cd597a..83b79d01fa40 100644 --- a/pkgs/development/interpreters/python/hooks/python-output-dist-hook.sh +++ b/pkgs/development/interpreters/python/hooks/python-output-dist-hook.sh @@ -3,7 +3,21 @@ echo "Sourcing python-catch-conflicts-hook.sh" pythonOutputDistPhase() { echo "Executing pythonOutputDistPhase" - mv "dist" "$dist" + if [[ -d dist ]]; then + mv "dist" "$dist" + else + cat >&2 <