diff options
author | Doron Behar <doron.behar@gmail.com> | 2024-01-13 23:09:04 +0200 |
---|---|---|
committer | Doron Behar <doron.behar@gmail.com> | 2024-01-21 13:32:10 +0200 |
commit | 8bd97eccd21fc0cdf1dc88710b6bbe4709d37b62 (patch) | |
tree | efb9261c36f7c5e8ba01321172049dc8cca3328d /pkgs/development/python-modules/scipy | |
parent | a23ee294e595fecb44b084841a21b559c0fcea33 (diff) |
python311Packages.scipy: actually use pytestCheckHook
Diffstat (limited to 'pkgs/development/python-modules/scipy')
-rw-r--r-- | pkgs/development/python-modules/scipy/default.nix | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/pkgs/development/python-modules/scipy/default.nix b/pkgs/development/python-modules/scipy/default.nix index d180e12265ee4..1908131e097e2 100644 --- a/pkgs/development/python-modules/scipy/default.nix +++ b/pkgs/development/python-modules/scipy/default.nix @@ -161,42 +161,9 @@ in buildPythonPackage { # hardeningDisable = lib.optionals (stdenv.isAarch64 && stdenv.isDarwin) [ "stackprotector" ]; - checkPhase = '' - runHook preCheck - - # Adapted from pytestCheckHook because scipy uses a custom check phase. - # It needs to pass `$args` as a Python list to `scipy.test` rather than as - # arguments to pytest on the command-line. - args="" - if [ -n "$disabledTests" ]; then - disabledTestsString=$(_pytestComputeDisabledTestsString "''${disabledTests[@]}") - args+="'-k','$disabledTestsString'" - fi - - if [ -n "''${disabledTestPaths-}" ]; then - eval "disabledTestPaths=($disabledTestPaths)" - fi - - for path in ''${disabledTestPaths[@]}; do - if [ ! -e "$path" ]; then - echo "Disabled tests path \"$path\" does not exist. Aborting" - exit 1 - fi - args+="''${args:+,}'--ignore=\"$path\"'" - done - args+="''${args:+,}$(printf \'%s\', "''${pytestFlagsArray[@]}")" - args=''${args%,} - - pushd "$out" + preCheck = '' export OMP_NUM_THREADS=$(( $NIX_BUILD_CORES / 4 )) - ${python.interpreter} -c "import scipy, sys; sys.exit(scipy.test( - 'fast', - verbose=10, - extra_argv=[$args], - parallel=$NIX_BUILD_CORES - ) != True)" - popd - runHook postCheck + cd $out ''; requiredSystemFeatures = [ "big-parallel" ]; # the tests need lots of CPU time |