02cf88bb76
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
53 lines
988 B
Nix
53 lines
988 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, pythonOlder
|
|
, setuptools-scm
|
|
, importlib-metadata
|
|
, packaging
|
|
# Check Inputs
|
|
, pytestCheckHook
|
|
, pytest-subtests
|
|
, numpy
|
|
, matplotlib
|
|
, uncertainties
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pint";
|
|
version = "0.19.2";
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
src = fetchPypi {
|
|
inherit version;
|
|
pname = "Pint";
|
|
sha256 = "sha256-4dSYn/UQs3ja1k+RcR572r5cp411sGoYVprEVGeMS68=";
|
|
};
|
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
|
|
|
propagatedBuildInputs = [ packaging ]
|
|
++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
|
|
|
|
checkInputs = [
|
|
pytestCheckHook
|
|
pytest-subtests
|
|
numpy
|
|
matplotlib
|
|
uncertainties
|
|
];
|
|
|
|
dontUseSetuptoolsCheck = true;
|
|
|
|
preCheck = ''
|
|
export HOME=$(mktemp -d)
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Physical quantities module";
|
|
license = licenses.bsd3;
|
|
homepage = "https://github.com/hgrecco/pint/";
|
|
maintainers = with maintainers; [ costrouc doronbehar ];
|
|
};
|
|
}
|