2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-08-05 21:33:18 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, importlib-metadata
|
2020-04-24 23:36:52 +00:00
|
|
|
, numpy
|
2021-08-05 21:33:18 +00:00
|
|
|
, pybind11
|
2021-03-09 03:18:52 +00:00
|
|
|
, pytestCheckHook
|
2021-08-05 21:33:18 +00:00
|
|
|
, pythonOlder
|
2022-09-30 11:47:45 +00:00
|
|
|
, setuptools
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyfma";
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "0.1.6";
|
2022-09-30 11:47:45 +00:00
|
|
|
format = "pyproject";
|
2021-08-05 21:33:18 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nschloe";
|
|
|
|
repo = pname;
|
2021-09-18 10:52:07 +00:00
|
|
|
rev = version;
|
|
|
|
sha256 = "12i68jj9n1qj9phjnj6f0kmfhlsd3fqjlk9p6d4gs008azw5m8yn";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2022-09-30 11:47:45 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
pybind11
|
|
|
|
];
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
propagatedBuildInputs = [
|
2020-04-24 23:36:52 +00:00
|
|
|
numpy
|
2021-08-05 21:33:18 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-03-09 03:18:52 +00:00
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
pythonImportsCheck = [ "pyfma" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Fused multiply-add for Python";
|
|
|
|
homepage = "https://github.com/nschloe/pyfma";
|
|
|
|
license = licenses.mit;
|
2021-08-05 21:33:18 +00:00
|
|
|
maintainers = with maintainers; [ costrouc ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|