nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
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.18";
19
20 src = fetchPypi {
21 inherit version;
22 pname = "Pint";
23 sha256 = "sha256-jEvOiEwmkFH+t6vGnb/RhAPAx2SryD2hMuinIi+LqAE=";
24 };
25
26 disabled = pythonOlder "3.6";
27
28 nativeBuildInputs = [ setuptools-scm ];
29
30 propagatedBuildInputs = [ packaging ]
31 ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
32
33 # Test suite explicitly requires pytest
34 checkInputs = [
35 pytestCheckHook
36 pytest-subtests
37 numpy
38 matplotlib
39 uncertainties
40 ];
41 dontUseSetuptoolsCheck = true;
42
43 meta = with lib; {
44 description = "Physical quantities module";
45 license = licenses.bsd3;
46 homepage = "https://github.com/hgrecco/pint/";
47 maintainers = with maintainers; [ costrouc doronbehar ];
48 };
49
50}