Skip to content

Commit

Permalink
buildPython*: pass check-related args whenever specified
Browse files Browse the repository at this point in the history
Pass
- disabledTests
- disabledTestPaths
- pytestFlags
- pytestFlagsArray
- unittestFlags
- unittestFlagsArray

whenever they are specified,
no matter if doCheck is true or if they are empty lists.

Simplify the buildPython* argument handling
and bring us closer to the deprecation of overridePythonAttrs
and the adoption of fixed-point arguments.
  • Loading branch information
ShamrockLee committed Jan 23, 2025
1 parent 3558a56 commit ed926ea
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions pkgs/development/interpreters/python/mk-python-derivation.nix
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,6 @@ let
"catchConflicts"
"pyproject"
"format"
"disabledTestPaths"
"disabledTests"
"pytestFlags"
"pytestFlagsArray"
"unittestFlags"
"unittestFlagsArray"
"outputs"
"stdenv"
"dependencies"
Expand Down Expand Up @@ -199,8 +193,6 @@ in

doCheck ? true,

disabledTestPaths ? [ ],

# Allow passing in a custom stdenv to buildPython*
stdenv ? python.stdenv,

Expand Down Expand Up @@ -434,26 +426,6 @@ let
# Longer-term we should get rid of `checkPhase` and use `installCheckPhase`.
installCheckPhase = attrs.checkPhase;
}
// optionalAttrs (attrs.doCheck or true) (
optionalAttrs (disabledTestPaths != [ ]) {
disabledTestPaths = disabledTestPaths;
}
// optionalAttrs (attrs ? disabledTests) {
disabledTests = attrs.disabledTests;
}
// optionalAttrs (attrs ? pytestFlags) {
pytestFlags = attrs.pytestFlags;
}
// optionalAttrs (attrs ? pytestFlagsArray) {
pytestFlagsArray = attrs.pytestFlagsArray;
}
// optionalAttrs (attrs ? unittestFlags) {
unittestFlags = attrs.unittestFlags;
}
// optionalAttrs (attrs ? unittestFlagsArray) {
unittestFlagsArray = attrs.unittestFlagsArray;
}
)
)
);

Expand Down

0 comments on commit ed926ea

Please sign in to comment.