2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
2022-02-10 20:34:41 +00:00
|
|
|
, stdenv
|
2021-12-06 16:07:01 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fastnumbers
|
|
|
|
, fetchFromGitHub
|
|
|
|
, hypothesis
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, typing-extensions
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "fastnumbers";
|
|
|
|
version = "3.2.1";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SethMMorton";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
sha256 = "1v9l5p90y6ygrs0qmgdzxfv2vp1mpfp65snkl9jp6kcy44g3alhp";
|
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
typing-extensions
|
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
# Tests fail due to numeric precision differences on ARM
|
|
|
|
# See https://github.com/SethMMorton/fastnumbers/issues/28
|
2022-08-12 12:06:08 +00:00
|
|
|
doCheck = !stdenv.hostPlatform.isAarch;
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
hypothesis
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"fastnumbers"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module for number conversion";
|
|
|
|
homepage = "https://github.com/SethMMorton/fastnumbers";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|