python3Packages.pyfma: fix build

This commit is contained in:
Fabian Affolter 2021-08-01 11:48:12 +02:00
parent 5b683507ec
commit abdd33edea

View file

@ -1,31 +1,37 @@
{ lib { lib
, buildPythonPackage , buildPythonPackage
, isPy27 , fetchFromGitHub
, fetchPypi , importlib-metadata
, pybind11
, exdown
, numpy , numpy
, pybind11
, pytestCheckHook , pytestCheckHook
, pythonOlder
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "pyfma"; pname = "pyfma";
version = "0.1.4"; version = "0.1.4";
disabled = pythonOlder "3.7";
disabled = isPy27; src = fetchFromGitHub {
owner = "nschloe";
src = fetchPypi { repo = pname;
inherit pname version; rev = "v${version}";
sha256 = "5bc6bf57d960a5232b7a56bd38e9fe3dce0911016746029931044b66bdec46e9"; sha256 = "1wkcl41j2d1yflc5dl30ys1yxx68w9zn3vj8brwkm1ar9jnfmg4h";
}; };
format = "pyproject";
buildInputs = [ buildInputs = [
pybind11 pybind11
]; ];
checkInputs = [ propagatedBuildInputs = [
exdown
numpy numpy
] ++ lib.optionals (pythonOlder "3.8") [
importlib-metadata
];
checkInputs = [
pytestCheckHook pytestCheckHook
]; ];
@ -35,6 +41,6 @@ buildPythonPackage rec {
description = "Fused multiply-add for Python"; description = "Fused multiply-add for Python";
homepage = "https://github.com/nschloe/pyfma"; homepage = "https://github.com/nschloe/pyfma";
license = licenses.mit; license = licenses.mit;
maintainers = [ maintainers.costrouc]; maintainers = with maintainers; [ costrouc ];
}; };
} }