lol

Merge pull request #240409 from SuperSandro2000/numpy-fail-tests

python310Packages.numpy: run tests correct so that actually fail the build

authored by

Sandro and committed by
GitHub
87956dff 0d7186ba

+11 -3
+11 -3
pkgs/development/python-modules/numpy/default.nix
··· 18 18 let 19 19 cfg = writeTextFile { 20 20 name = "site.cfg"; 21 - text = (lib.generators.toINI {} { 21 + text = lib.generators.toINI {} { 22 22 ${blas.implementation} = { 23 23 include_dirs = "${lib.getDev blas}/include:${lib.getDev lapack}/include"; 24 24 library_dirs = "${blas}/lib:${lapack}/lib"; ··· 35 35 library_dirs = "${blas}/lib"; 36 36 runtime_library_dirs = "${blas}/lib"; 37 37 }; 38 - }); 38 + }; 39 39 }; 40 40 in buildPythonPackage rec { 41 41 pname = "numpy"; ··· 56 56 ./numpy-distutils-C++.patch 57 57 ]; 58 58 59 + postPatch = '' 60 + # fails with multiple errors because we are not using the pinned setuptools version 61 + # see https://github.com/numpy/numpy/blob/v1.25.0/pyproject.toml#L7 62 + # error: option --single-version-externally-managed not recognized 63 + # TypeError: dist must be a Distribution instance 64 + rm numpy/core/tests/test_cython.py 65 + ''; 66 + 59 67 nativeBuildInputs = [ gfortran cython ]; 60 68 buildInputs = [ blas lapack ]; 61 69 ··· 83 91 checkPhase = '' 84 92 runHook preCheck 85 93 pushd "$out" 86 - ${python.interpreter} -c 'import numpy; numpy.test("fast", verbose=10)' 94 + ${python.interpreter} -c 'import numpy, sys; sys.exit(numpy.test("fast", verbose=10) is False)' 87 95 popd 88 96 runHook postCheck 89 97 '';