2019-06-16 12:59:06 -07:00
|
|
|
{lib, fetchPypi, python, buildPythonPackage, gfortran, nose, pytest, numpy}:
|
2016-02-04 12:30:39 -08:00
|
|
|
|
2017-05-16 00:22:46 -07:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "scipy";
|
2019-11-11 03:13:40 -08:00
|
|
|
version = "1.3.2";
|
2016-02-04 12:30:39 -08:00
|
|
|
|
2018-04-04 10:51:03 -07:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-11-11 03:13:40 -08:00
|
|
|
sha256 = "a03939b431994289f39373c57bbe452974a7da724ae7f9620a1beee575434da4";
|
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 ];
|
|
|
|
buildInputs = [ numpy.blas ];
|
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
|
|
|
|
'';
|
|
|
|
|
2018-08-30 09:58:10 -07:00
|
|
|
# INTERNALERROR, solved with https://github.com/scipy/scipy/pull/8871
|
|
|
|
# however, it does not apply cleanly.
|
|
|
|
doCheck = false;
|
|
|
|
|
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'" ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "SciPy (pronounced 'Sigh Pie') is open-source software for mathematics, science, and engineering. ";
|
2018-06-27 13:12:57 -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
|
|
|
};
|
|
|
|
}
|