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";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "0.19.2";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit version;
|
|
|
|
pname = "Pint";
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-4dSYn/UQs3ja1k+RcR572r5cp411sGoYVprEVGeMS68=";
|
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
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
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/";
|
2021-12-19 01:06:50 +00:00
|
|
|
maintainers = with maintainers; [ costrouc doronbehar ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|