Skip to content

Commit

Permalink
python3Packages.pytest-xdist: simplify setup hook
Browse files Browse the repository at this point in the history
Same reasoning as commit before.
  • Loading branch information
wolfgangwalther committed Dec 9, 2024
1 parent 54f0457 commit 0cd7dfa
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions pkgs/development/python-modules/pytest-xdist/setup-hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,7 @@ pytestXdistHook() {
)
}

# the flags should be added before pytestCheckHook runs so
# until we have dependency mechanism in generic builder, we need to use this ugly hack.

if [ -z "${dontUsePytestXdist-}" ] && [ -z "${dontUsePytestCheck-}" ]; then
if [[ " ${preDistPhases[*]:-} " =~ " pytestCheckPhase " ]]; then
_preDistPhases="${preDistPhases[*]} "
_preDistPhases="${_preDistPhases/ pytestCheckPhase / pytestXdistHook pytestCheckPhase }"
if [[ -n "${__structuredAttrs-}" ]]; then
preDistPhases=()
else
preDistPhases=""
fi
appendToVar preDistPhases $_preDistPhases
unset _preDistPhases
else
appendToVar preDistPhases pytestXdistHook
fi
# The flags should be added before pytestCheckHook runs in preDistPhases.
preInstallCheckHooks+=(pytestXdistHook)
fi

0 comments on commit 0cd7dfa

Please sign in to comment.