2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
pythonOlder,
|
2023-08-10 07:59:29 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# build-system
|
|
|
|
setuptools,
|
|
|
|
setuptools-scm,
|
2023-08-10 07:59:29 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# propagates
|
|
|
|
typing-extensions,
|
2023-08-10 07:59:29 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# tests
|
|
|
|
pytestCheckHook,
|
|
|
|
pytest-subtests,
|
|
|
|
pytest-benchmark,
|
|
|
|
numpy,
|
|
|
|
matplotlib,
|
|
|
|
uncertainties,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pint";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "0.23";
|
2023-08-10 07:59:29 +00:00
|
|
|
format = "pyproject";
|
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";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-4VCbkWBtvFJSfGAKTvdP+sEv/3Boiv8g6QckCTRuybQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ typing-extensions ];
|
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
|
2024-01-02 11:29:13 +00:00
|
|
|
pytest-benchmark
|
2020-04-24 23:36:52 +00:00
|
|
|
numpy
|
|
|
|
matplotlib
|
|
|
|
uncertainties
|
|
|
|
];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "--benchmark-disable" ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
disabledTests = [
|
2024-01-02 11:29:13 +00:00
|
|
|
# https://github.com/hgrecco/pint/issues/1898
|
|
|
|
"test_load_definitions_stage_2"
|
2024-04-21 15:54:59 +00:00
|
|
|
# pytest8 deprecation
|
|
|
|
"test_nonnumeric_magnitudes"
|
2023-08-10 07:59:29 +00:00
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2023-08-10 07:59:29 +00:00
|
|
|
changelog = "https://github.com/hgrecco/pint/blob/${version}/CHANGES";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Physical quantities module";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "pint-convert";
|
2020-04-24 23:36:52 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|