2019-12-19 10:31:15 -08:00
|
|
|
{lib, fetchPypi, python, buildPythonPackage, gfortran, nose, pytest, numpy, pybind11}:
|
|
|
|
|
|
|
|
let
|
|
|
|
pybind = pybind11.overridePythonAttrs(oldAttrs: {
|
|
|
|
cmakeFlags = oldAttrs.cmakeFlags ++ [
|
|
|
|
"-DPYBIND11_TEST=off"
|
|
|
|
];
|
|
|
|
doCheck = false; # Circular test dependency
|
|
|
|
});
|
|
|
|
in buildPythonPackage rec {
|
2017-05-16 00:22:46 -07:00
|
|
|
pname = "scipy";
|
2020-07-31 01:51:46 -07:00
|
|
|
version = "1.5.2";
|
2016-02-04 12:30:39 -08:00
|
|
|
|
2018-04-04 10:51:03 -07:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-07-31 01:51:46 -07:00
|
|
|
sha256 = "066c513d90eb3fd7567a9e150828d39111ebd88d3e924cdfc9f8ce19ab6f90c9";
|
2017-05-16 00:22:46 -07:00
|
|
|
};
|
2016-02-04 12:30:39 -08:00
|
|
|
|
2017-10-25 11:04:35 -07:00
|
|
|
checkInputs = [ nose pytest ];
|
2018-09-25 11:08:21 -07:00
|
|
|
nativeBuildInputs = [ gfortran ];
|
2019-12-19 10:31:15 -08:00
|
|
|
buildInputs = [ numpy.blas pybind ];
|
2017-05-16 00:22:46 -07:00
|
|
|
propagatedBuildInputs = [ numpy ];
|
2016-02-04 12:30:39 -08:00
|
|
|
|
2016-07-28 02:03:27 -07:00
|
|
|
# Remove tests because of broken wrapper
|
|
|
|
prePatch = ''
|
|
|
|
rm scipy/linalg/tests/test_lapack.py
|
|
|
|
'';
|
|
|
|
|
2019-12-19 10:31:15 -08:00
|
|
|
doCheck = true;
|
2018-08-30 09:58:10 -07:00
|
|
|
|
2016-02-04 12:30:39 -08:00
|
|
|
preConfigure = ''
|
|
|
|
sed -i '0,/from numpy.distutils.core/s//import setuptools;from numpy.distutils.core/' setup.py
|
2017-07-30 01:19:15 -07:00
|
|
|
export NPY_NUM_BUILD_JOBS=$NIX_BUILD_CORES
|
2016-02-04 12:30:39 -08:00
|
|
|
'';
|
|
|
|
|
|
|
|
preBuild = ''
|
2018-10-18 12:00:48 -07:00
|
|
|
ln -s ${numpy.cfg} site.cfg
|
2016-02-04 12:30:39 -08:00
|
|
|
'';
|
|
|
|
|
2017-07-30 01:19:15 -07:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2016-02-04 12:30:39 -08:00
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
pushd dist
|
|
|
|
${python.interpreter} -c 'import scipy; scipy.test("fast", verbose=10)'
|
|
|
|
popd
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
blas = numpy.blas;
|
|
|
|
};
|
|
|
|
|
|
|
|
setupPyBuildFlags = [ "--fcompiler='gnu95'" ];
|
|
|
|
|
2020-04-22 10:38:28 -07:00
|
|
|
SCIPY_USE_G77_ABI_WRAPPER = 1;
|
|
|
|
|
2016-02-04 12:30:39 -08:00
|
|
|
meta = {
|
|
|
|
description = "SciPy (pronounced 'Sigh Pie') is open-source software for mathematics, science, and engineering. ";
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://www.scipy.org/";
|
2016-02-04 12:30:39 -08:00
|
|
|
maintainers = with lib.maintainers; [ fridh ];
|
2017-05-16 00:22:46 -07:00
|
|
|
};
|
|
|
|
}
|