1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 setuptools,
8 setuptools-scm,
9
10 # optional-dependencies
11 numpy,
12
13 # tests
14 pytestCheckHook,
15}:
16
17buildPythonPackage rec {
18 pname = "uncertainties";
19 version = "3.2.2";
20 pyproject = true;
21
22 src = fetchFromGitHub {
23 owner = "lmfit";
24 repo = "uncertainties";
25 tag = version;
26 hash = "sha256-cm0FeJCxyBLN0GCKPnscBCx9p9qCDQdwRfhBRgQIhAo=";
27 };
28
29 build-system = [
30 setuptools
31 setuptools-scm
32 ];
33
34 optional-dependencies.arrays = [ numpy ];
35
36 nativeCheckInputs = [
37 pytestCheckHook
38 ] ++ optional-dependencies.arrays;
39
40 pythonImportsCheck = [ "uncertainties" ];
41
42 meta = with lib; {
43 homepage = "https://pythonhosted.org/uncertainties/";
44 description = "Transparent calculations with uncertainties on the quantities involved (aka error propagation)";
45 maintainers = with maintainers; [ rnhmjoj ];
46 license = licenses.bsd3;
47 };
48}