Merge pull request #61753 from costrouc/python-accupy-init

pythonPackages.accupy: init at 0.1.4
This commit is contained in:
Mario Rodas
2019-05-31 00:03:26 -05:00
committed by GitHub
5 changed files with 196 additions and 0 deletions

View File

@@ -0,0 +1,62 @@
{ lib
, buildPythonPackage
, fetchPypi
, mpmath
, numpy
, pipdate
, pybind11
, pyfma
, eigen
, pytest
, matplotlib
, perfplot
, isPy27
}:
buildPythonPackage rec {
pname = "accupy";
version = "0.1.4";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "2a67f2a778b824fb24eb338fed8e0b61c1af93369d57ff8132f5d602d60f0543";
};
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 ];
};
}

View File

@@ -0,0 +1,45 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, matplotlib
, numpy
, pipdate
, tqdm
, pytest
, isPy27
}:
buildPythonPackage rec {
pname = "perfplot";
version = "0.5.0";
disabled = isPy27;
src = fetchFromGitHub {
owner = "nschloe";
repo = "perfplot";
rev = "v${version}";
sha256 = "16aj5ryjic1k3qn8xhpw6crczvxcs691vs5kv4pvb1zdx69g1xbv";
};
propagatedBuildInputs = [
matplotlib
numpy
pipdate
tqdm
];
checkInputs = [
pytest
];
checkPhase = ''
HOME=$(mktemp -d) pytest test/perfplot_test.py
'';
meta = with lib; {
description = "Performance plots for Python code snippets";
homepage = https://github.com/nschloe/perfplot;
license = licenses.mit;
maintainers = [ maintainers.costrouc ];
};
}

View File

@@ -0,0 +1,40 @@
{ lib
, buildPythonPackage
, fetchPypi
, appdirs
, requests
, pytest
}:
buildPythonPackage rec {
pname = "pipdate";
version = "0.3.2";
src = fetchPypi {
inherit pname version;
sha256 = "a27f64d13269adfd8594582f5a62c9f2151b426e701afdfc3b4f4019527b4121";
};
propagatedBuildInputs = [
appdirs
requests
];
checkInputs = [
pytest
];
checkPhase = ''
HOME=$(mktemp -d) pytest test/test_pipdate.py
'';
# tests require network access
doCheck = false;
meta = with lib; {
description = "pip update helpers";
homepage = https://github.com/nschloe/pipdate;
license = licenses.mit;
maintainers = [ maintainers.costrouc ];
};
}

View File

@@ -0,0 +1,41 @@
{ lib
, buildPythonPackage
, fetchPypi
, pybind11
, numpy
, pytest
}:
buildPythonPackage rec {
pname = "pyfma";
version = "0.1.0";
src = fetchPypi {
inherit pname version;
sha256 = "79514717f8e632a0fb165e3d61222ed61202bea7b0e082f7b41c91e738f1fbc9";
};
buildInputs = [
pybind11
];
checkInputs = [
numpy
pytest
];
preBuild = ''
export HOME=$(mktemp -d)
'';
checkPhase = ''
pytest test
'';
meta = with lib; {
description = "Fused multiply-add for Python";
homepage = https://github.com/nschloe/pyfma;
license = licenses.mit;
maintainers = [ maintainers.costrouc];
};
}