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.19.2";
19
20 disabled = pythonOlder "3.6";
21
22 src = fetchPypi {
23 inherit version;
24 pname = "Pint";
25 sha256 = "sha256-4dSYn/UQs3ja1k+RcR572r5cp411sGoYVprEVGeMS68=";
26 };
27
28 nativeBuildInputs = [ setuptools-scm ];
29
30 propagatedBuildInputs = [ packaging ]
31 ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
32
33 checkInputs = [
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}