python3Packages.numpy: 1.19.4 -> 1.20.1
This commit is contained in:
parent
d247e9f2f8
commit
e29a4c3124
|
@ -4,15 +4,15 @@
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, gfortran
|
, gfortran
|
||||||
, hypothesis
|
, hypothesis
|
||||||
, pytest_5
|
, pytest
|
||||||
, blas
|
, blas
|
||||||
, lapack
|
, lapack
|
||||||
, writeTextFile
|
, writeTextFile
|
||||||
, isPyPy
|
, isPyPy
|
||||||
, cython
|
, cython
|
||||||
, setuptoolsBuildHook
|
, setuptoolsBuildHook
|
||||||
, fetchpatch
|
, pythonOlder
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert (!blas.isILP64) && (!lapack.isILP64);
|
assert (!blas.isILP64) && (!lapack.isILP64);
|
||||||
|
|
||||||
|
@ -40,31 +40,26 @@ let
|
||||||
};
|
};
|
||||||
in buildPythonPackage rec {
|
in buildPythonPackage rec {
|
||||||
pname = "numpy";
|
pname = "numpy";
|
||||||
version = "1.19.4";
|
version = "1.20.1";
|
||||||
format = "pyproject.toml";
|
format = "pyproject.toml";
|
||||||
|
disabled = pythonOlder "3.7";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
extension = "zip";
|
extension = "zip";
|
||||||
sha256 = "141ec3a3300ab89c7f2b0775289954d193cc8edb621ea05f99db9cb181530512";
|
sha256 = "02m6sms6wb4flfg8y4h0msan4y7w7qgfqxhdk21lcabhm2339iiv";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ gfortran cython setuptoolsBuildHook ];
|
patches = lib.optionals python.hasDistutilsCxxPatch [
|
||||||
buildInputs = [ blas lapack ];
|
|
||||||
|
|
||||||
patches = [
|
|
||||||
# For compatibility with newer pytest
|
|
||||||
(fetchpatch {
|
|
||||||
url = "https://github.com/numpy/numpy/commit/ba315034759fbf91c61bb55390edc86e7b2627f3.patch";
|
|
||||||
sha256 = "F2P5q61CyhqsZfwkLmxb7A9YdE+43FXLbQkSjop2rVY=";
|
|
||||||
})
|
|
||||||
] ++ lib.optionals python.hasDistutilsCxxPatch [
|
|
||||||
# We patch cpython/distutils to fix https://bugs.python.org/issue1222585
|
# We patch cpython/distutils to fix https://bugs.python.org/issue1222585
|
||||||
# Patching of numpy.distutils is needed to prevent it from undoing the
|
# Patching of numpy.distutils is needed to prevent it from undoing the
|
||||||
# patch to distutils.
|
# patch to distutils.
|
||||||
./numpy-distutils-C++.patch
|
./numpy-distutils-C++.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs = [ gfortran cython setuptoolsBuildHook ];
|
||||||
|
buildInputs = [ blas lapack ];
|
||||||
|
|
||||||
# we default openblas to build with 64 threads
|
# we default openblas to build with 64 threads
|
||||||
# if a machine has more than 64 threads, it will segfault
|
# if a machine has more than 64 threads, it will segfault
|
||||||
# see https://github.com/xianyi/OpenBLAS/issues/2993
|
# see https://github.com/xianyi/OpenBLAS/issues/2993
|
||||||
|
@ -83,7 +78,7 @@ in buildPythonPackage rec {
|
||||||
doCheck = !isPyPy; # numpy 1.16+ hits a bug in pypy's ctypes, using either numpy or pypy HEAD fixes this (https://github.com/numpy/numpy/issues/13807)
|
doCheck = !isPyPy; # numpy 1.16+ hits a bug in pypy's ctypes, using either numpy or pypy HEAD fixes this (https://github.com/numpy/numpy/issues/13807)
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
pytest_5 # pytest 6 will error: "module is already imported: hypothesis"
|
pytest
|
||||||
hypothesis
|
hypothesis
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue