nixpkgs/pkgs/development/python-modules/accupy/default.nix

63 lines
977 B
Nix
Raw Normal View History

2019-05-20 16:55:11 +02:00
{ lib
, buildPythonPackage
, fetchPypi
, mpmath
, numpy
, pipdate
, pybind11
, pyfma
, eigen
, pytest
, matplotlib
, perfplot
, isPy27
}:
buildPythonPackage rec {
pname = "accupy";
2019-10-24 08:47:23 +02:00
version = "0.2.0";
2019-05-20 16:55:11 +02:00
disabled = isPy27;
src = fetchPypi {
inherit pname version;
2019-10-24 08:47:23 +02:00
sha256 = "e27ca7eed8a1bde2e6e040f8f3ee94a5d7522f42c4360756c9ec8931cf13ca98";
2019-05-20 16:55:11 +02: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";
2019-05-20 16:55:11 +02:00
license = licenses.mit;
maintainers = [ maintainers.costrouc ];
};
}