diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2024-01-22 12:01:39 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-22 12:01:39 +0000 |
commit | 2227557d884c123734c2dac2f5359a7fabc677b0 (patch) | |
tree | 4c95abf1a5eb54287496c48e439bf61f0e378299 /pkgs/development/python-modules/scipy | |
parent | f8a1f265bedc4330db18dd0024e6fa99659ce784 (diff) | |
parent | 3a8094730e6ff9783b31c423af848b63abbeaebb (diff) |
Merge staging-next into staging
Diffstat (limited to 'pkgs/development/python-modules/scipy')
-rw-r--r-- | pkgs/development/python-modules/scipy/default.nix | 55 |
1 files changed, 13 insertions, 42 deletions
diff --git a/pkgs/development/python-modules/scipy/default.nix b/pkgs/development/python-modules/scipy/default.nix index 14179f9e859be..b2a58d71c0b1d 100644 --- a/pkgs/development/python-modules/scipy/default.nix +++ b/pkgs/development/python-modules/scipy/default.nix @@ -13,6 +13,9 @@ , pkg-config , pythran , wheel +, nose +, setuptools +, hypothesis , pytestCheckHook , pytest-xdist , numpy @@ -31,8 +34,8 @@ let # nix-shell maintainers/scripts/update.nix --argstr package python3.pkgs.scipy # # The update script uses sed regexes to replace them with the updated hashes. - version = "1.11.4"; - srcHash = "sha256-hNAZOMDFYqZpb67Pzg/WALWagFYvqYO1jOmcipDDRbE="; + version = "1.12.0"; + srcHash = "sha256-PuiyYTgSegDTV9Kae5N68FOXT1jyJrNv9p2aFP70Z20="; datasetsHashes = { ascent = "1qjp35ncrniq9rhzb14icwwykqg2208hcssznn3hz27w39615kh3"; ecg = "1bwbjp43b7znnwha5hv6wiz3g0bhwrpqpi75s12zidxrbwvd62pj"; @@ -80,13 +83,11 @@ in buildPythonPackage { }) ]; - # Relax deps a bit + # Upstream complicated numpy version pinning is causing issues in the + # configurePhase, so we pass on it. postPatch = '' substituteInPlace pyproject.toml \ - --replace 'meson-python>=0.12.1,<0.15.0' 'meson-python' \ - --replace 'numpy==' 'numpy>=' \ - --replace "pybind11>=2.10.4,<2.11.1" "pybind11>=2.10.4,<2.12.0" \ - --replace 'wheel<0.41.0' 'wheel' + --replace-fail 'numpy==' 'numpy>=' \ ''; nativeBuildInputs = [ @@ -96,6 +97,7 @@ in buildPythonPackage { pythran pkg-config wheel + setuptools ]; buildInputs = [ @@ -113,6 +115,8 @@ in buildPythonPackage { __darwinAllowLocalNetworking = true; nativeCheckInputs = [ + nose + hypothesis pytestCheckHook pytest-xdist ]; @@ -162,42 +166,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 |