2019-05-20 15:55:11 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, mpmath
|
|
|
|
, numpy
|
|
|
|
, pipdate
|
|
|
|
, pybind11
|
|
|
|
, pyfma
|
|
|
|
, eigen
|
2020-09-26 12:16:38 +01:00
|
|
|
, pytestCheckHook
|
2019-05-20 15:55:11 +01:00
|
|
|
, matplotlib
|
|
|
|
, isPy27
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "accupy";
|
2020-10-16 02:16:16 +01:00
|
|
|
version = "0.3.3";
|
2019-05-20 15:55:11 +01:00
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-10-16 02:16:16 +01:00
|
|
|
sha256 = "a234c9897a683a6ade44f0bafa71196f122a61e3ebeacb5b813e7d139d54f3c7";
|
2019-05-20 15:55:11 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
pybind11 eigen
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
mpmath
|
|
|
|
numpy
|
|
|
|
pipdate
|
|
|
|
pyfma
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
2020-09-26 12:16:38 +01:00
|
|
|
pytestCheckHook
|
2019-05-20 15:55:11 +01:00
|
|
|
matplotlib
|
|
|
|
];
|
|
|
|
|
|
|
|
postConfigure = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "/usr/include/eigen3/" "${eigen}/include/eigen3/"
|
|
|
|
'';
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
2020-09-26 12:16:38 +01:00
|
|
|
# performance tests aren't useful to us and disabling them allows us to
|
|
|
|
# decouple ourselves from an unnecessary build dep
|
|
|
|
preCheck = ''
|
|
|
|
for f in test/test*.py ; do
|
|
|
|
substituteInPlace $f --replace 'import perfplot' ""
|
|
|
|
done
|
2019-05-20 15:55:11 +01:00
|
|
|
'';
|
2020-09-26 12:16:38 +01:00
|
|
|
disabledTests = [ "test_speed_comparison1" "test_speed_comparison2" ];
|
|
|
|
pythonImportsCheck = [ "accupy" ];
|
2019-05-20 15:55:11 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Accurate sums and dot products for Python";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/nschloe/accupy";
|
2019-05-20 15:55:11 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|