02cf88bb76
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
49 lines
978 B
Nix
49 lines
978 B
Nix
{ lib
|
|
, stdenv
|
|
, 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
|
|
];
|
|
|
|
# Tests fail due to numeric precision differences on ARM
|
|
# See https://github.com/SethMMorton/fastnumbers/issues/28
|
|
doCheck = !stdenv.hostPlatform.isAarch;
|
|
|
|
checkInputs = [
|
|
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 ];
|
|
};
|
|
}
|