1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 flit-core,
6 pytestCheckHook,
7 pythonOlder,
8 inform,
9 parametrize-from-file,
10 setuptools,
11 voluptuous,
12 quantiphy-eval,
13 rkm-codes,
14}:
15
16buildPythonPackage rec {
17 pname = "quantiphy";
18 version = "2.20";
19 format = "pyproject";
20
21 disabled = pythonOlder "3.7";
22
23 src = fetchFromGitHub {
24 owner = "KenKundert";
25 repo = "quantiphy";
26 tag = "v${version}";
27 hash = "sha256-QXCs93plNSVNiCLEoXx2raH6EbH1rXyjvpBfl+8eXjc=";
28 };
29
30 nativeBuildInputs = [ flit-core ];
31
32 propagatedBuildInputs = [
33 quantiphy-eval
34 rkm-codes
35 ];
36
37 nativeCheckInputs = [
38 inform
39 parametrize-from-file
40 pytestCheckHook
41 setuptools
42 voluptuous
43 ];
44
45 pythonImportsCheck = [ "quantiphy" ];
46
47 meta = with lib; {
48 description = "Module for physical quantities (numbers with units)";
49 homepage = "https://quantiphy.readthedocs.io";
50 changelog = "https://github.com/KenKundert/quantiphy/releases/tag/v${version}";
51 license = licenses.mit;
52 maintainers = with maintainers; [ jpetrucciani ];
53 };
54}