2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, mpmath
|
|
|
|
, numpy
|
|
|
|
, pipdate
|
|
|
|
, pybind11
|
|
|
|
, pyfma
|
|
|
|
, eigen
|
|
|
|
, pytest
|
|
|
|
, matplotlib
|
|
|
|
, perfplot
|
|
|
|
, isPy27
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "accupy";
|
2020-08-20 17:08:02 +00:00
|
|
|
version = "0.3.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-08-20 17:08:02 +00:00
|
|
|
sha256 = "be5c8c9ef2f83c9eeddac85463879957c87a93b257a6202a76ad6b43080b32f9";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
pybind11 eigen
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
mpmath
|
|
|
|
numpy
|
|
|
|
pipdate
|
|
|
|
pyfma
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
matplotlib
|
|
|
|
perfplot
|
|
|
|
];
|
|
|
|
|
|
|
|
postConfigure = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "/usr/include/eigen3/" "${eigen}/include/eigen3/"
|
|
|
|
'';
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
pytest test
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Accurate sums and dot products for Python";
|
|
|
|
homepage = "https://github.com/nschloe/accupy";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|