1{ lib
2, stdenv
3, buildPythonPackage
4, fastnumbers
5, fetchFromGitHub
6, hypothesis
7, pytestCheckHook
8, pythonOlder
9, typing-extensions
10}:
11
12buildPythonPackage rec {
13 pname = "fastnumbers";
14 version = "3.2.1";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.6";
18
19 src = fetchFromGitHub {
20 owner = "SethMMorton";
21 repo = pname;
22 rev = version;
23 sha256 = "1v9l5p90y6ygrs0qmgdzxfv2vp1mpfp65snkl9jp6kcy44g3alhp";
24 };
25
26 propagatedBuildInputs = [
27 typing-extensions
28 ];
29
30 # Tests fail due to numeric precision differences on ARM
31 # See https://github.com/SethMMorton/fastnumbers/issues/28
32 doCheck = !stdenv.hostPlatform.isAarch;
33
34 checkInputs = [
35 hypothesis
36 pytestCheckHook
37 ];
38
39 pythonImportsCheck = [
40 "fastnumbers"
41 ];
42
43 meta = with lib; {
44 description = "Python module for number conversion";
45 homepage = "https://github.com/SethMMorton/fastnumbers";
46 license = licenses.mit;
47 maintainers = with maintainers; [ fab ];
48 };
49}