From 884436b2548b183c8951f4d31b3e3245d4989efd Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Mon, 30 Mar 2020 01:59:01 -0700 Subject: [PATCH] pythonPackages.pytestCheckHook: disable setuptoolsCheckPhase --- .../interpreters/python/hooks/pytest-check-hook.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/development/interpreters/python/hooks/pytest-check-hook.sh b/pkgs/development/interpreters/python/hooks/pytest-check-hook.sh index 18f05b6d218..bfd2bfa7583 100644 --- a/pkgs/development/interpreters/python/hooks/pytest-check-hook.sh +++ b/pkgs/development/interpreters/python/hooks/pytest-check-hook.sh @@ -46,4 +46,16 @@ function pytestCheckPhase() { if [ -z "${dontUsePytestCheck-}" ] && [ -z "${installCheckPhase-}" ]; then echo "Using pytestCheckPhase" preDistPhases+=" pytestCheckPhase" + + # It's almost always the case that setuptoolsCheckPhase should not be ran + # when the pytestCheckHook is being ran + if [ -z "${useSetuptoolsCheck-}" ]; then + dontUseSetuptoolsCheck=1 + + # Remove command if already injected into preDistPhases + if [[ "$preDistPhases" =~ "setuptoolsCheckPhase" ]]; then + echo "Removing setuptoolsCheckPhase" + preDistPhases=${preDistPhases/setuptoolsCheckPhase/} + fi + fi fi