pythonPackages.pytest.setupHook: run in correct phase
It was reported that the 2nd solution wasn't working as expected because it was ran in the wrong phase. This commit creates a new phase, in between the installCheckPhase and distPhase.
This commit is contained in:
parent
7242ef1ec1
commit
20a4a4b593
@ -29,9 +29,11 @@ buildPythonPackage rec {
|
|||||||
|
|
||||||
# Remove .pytest_cache when using py.test in a Nix build
|
# Remove .pytest_cache when using py.test in a Nix build
|
||||||
setupHook = writeText "pytest-hook" ''
|
setupHook = writeText "pytest-hook" ''
|
||||||
postFixupHooks+=(
|
pytestcachePhase() {
|
||||||
'find $out -name .pytest_cache -type d -exec rm -rf {} +'
|
find $out -name .pytest_cache -type d -exec rm -rf {} +
|
||||||
)
|
}
|
||||||
|
|
||||||
|
preDistPhases+=" pytestcachePhase"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user