mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 18:42:15 +00:00
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
|
||||
setupHook = writeText "pytest-hook" ''
|
||||
postFixupHooks+=(
|
||||
'find $out -name .pytest_cache -type d -exec rm -rf {} +'
|
||||
)
|
||||
pytestcachePhase() {
|
||||
find $out -name .pytest_cache -type d -exec rm -rf {} +
|
||||
}
|
||||
|
||||
preDistPhases+=" pytestcachePhase"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
Loading…
Reference in a new issue