2023-03-09 17:35:58 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildPythonPackage
|
|
|
|
, isPy3k
|
|
|
|
, flit-core
|
|
|
|
, flit-scm
|
|
|
|
, sympy
|
|
|
|
, pytestCheckHook
|
|
|
|
, sphinx
|
|
|
|
}:
|
2019-07-07 19:09:17 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "measurement";
|
2023-02-27 01:14:29 +00:00
|
|
|
version = "3.2.2";
|
2023-03-09 17:35:58 +00:00
|
|
|
format = "pyproject";
|
2019-07-07 19:09:17 +00:00
|
|
|
|
2019-11-09 16:39:00 +00:00
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "coddingtonbear";
|
|
|
|
repo = "python-measurement";
|
2023-02-27 01:14:29 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-03-03 00:48:06 +00:00
|
|
|
hash = "sha256-ULId0W10FaAtSgVY5ctQL3FPETVr+oq6TKWd/W53viM=";
|
2019-07-07 19:09:17 +00:00
|
|
|
};
|
|
|
|
|
2023-03-09 17:35:58 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
flit-core
|
|
|
|
flit-scm
|
|
|
|
sphinx
|
|
|
|
];
|
|
|
|
|
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
2019-11-09 16:39:00 +00:00
|
|
|
postPatch = ''
|
2023-03-09 17:35:58 +00:00
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "--cov=measurement" ""
|
2019-11-09 16:39:00 +00:00
|
|
|
'';
|
|
|
|
|
2023-03-09 17:35:58 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
sympy
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2019-07-07 19:09:17 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Use and manipulate unit-aware measurement objects in Python";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/coddingtonbear/python-measurement";
|
2023-03-09 17:35:58 +00:00
|
|
|
changelog = "https://github.com/coddingtonbear/python-measurement/releases/tag/${version}";
|
2019-07-07 19:09:17 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ bhipple ];
|
|
|
|
};
|
|
|
|
}
|