2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pythonOlder
|
2021-06-04 09:07:49 +00:00
|
|
|
, setuptools-scm
|
2020-09-25 04:45:31 +00:00
|
|
|
, importlib-metadata
|
|
|
|
, packaging
|
2020-04-24 23:36:52 +00:00
|
|
|
# Check Inputs
|
|
|
|
, pytestCheckHook
|
2021-12-19 01:06:50 +00:00
|
|
|
, pytest-subtests
|
2020-04-24 23:36:52 +00:00
|
|
|
, numpy
|
|
|
|
, matplotlib
|
|
|
|
, uncertainties
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pint";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "0.20.1";
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit version;
|
|
|
|
pname = "Pint";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-OHzwQHjcff5KcIAzuq1Uq2HYKrBsTuPUkiseRdViYGc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
propagatedBuildInputs = [ packaging ]
|
|
|
|
++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-04-24 23:36:52 +00:00
|
|
|
pytestCheckHook
|
2021-12-19 01:06:50 +00:00
|
|
|
pytest-subtests
|
2020-04-24 23:36:52 +00:00
|
|
|
numpy
|
|
|
|
matplotlib
|
|
|
|
uncertainties
|
|
|
|
];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
dontUseSetuptoolsCheck = true;
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Physical quantities module";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
homepage = "https://github.com/hgrecco/pint/";
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ doronbehar ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|