1{ lib
2, buildPythonPackage
3, fetchPypi
4, pythonOlder
5, setuptools-scm
6, importlib-metadata
7, packaging
8# Check Inputs
9, pytestCheckHook
10, pytest-subtests
11, numpy
12, matplotlib
13, uncertainties
14}:
15
16buildPythonPackage rec {
17 pname = "pint";
18 version = "0.20.1";
19
20 disabled = pythonOlder "3.6";
21
22 src = fetchPypi {
23 inherit version;
24 pname = "Pint";
25 hash = "sha256-OHzwQHjcff5KcIAzuq1Uq2HYKrBsTuPUkiseRdViYGc=";
26 };
27
28 nativeBuildInputs = [ setuptools-scm ];
29
30 propagatedBuildInputs = [ packaging ]
31 ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
32
33 nativeCheckInputs = [
34 pytestCheckHook
35 pytest-subtests
36 numpy
37 matplotlib
38 uncertainties
39 ];
40
41 dontUseSetuptoolsCheck = true;
42
43 preCheck = ''
44 export HOME=$(mktemp -d)
45 '';
46
47 meta = with lib; {
48 description = "Physical quantities module";
49 license = licenses.bsd3;
50 homepage = "https://github.com/hgrecco/pint/";
51 maintainers = with maintainers; [ costrouc doronbehar ];
52 };
53}