2020-04-24 23:36:52 +00:00
|
|
|
{ lib, fetchFromGitHub, buildPythonPackage, isPy3k
|
2021-07-24 12:14:16 +00:00
|
|
|
, sympy, pytest, pytest-runner, sphinx, setuptools-scm }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "measurement";
|
|
|
|
version = "3.2.0";
|
|
|
|
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "coddingtonbear";
|
|
|
|
repo = "python-measurement";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "1mk9qg1q4cnnipr6xa72i17qvwwhz2hd8p4vlsa9gdzrcv4vr8h9";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i 's|use_scm_version=True|version="${version}"|' setup.py
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytest pytest-runner ];
|
2021-06-04 09:07:49 +00:00
|
|
|
nativeBuildInputs = [ sphinx setuptools-scm ];
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [ sympy ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Use and manipulate unit-aware measurement objects in Python";
|
|
|
|
homepage = "https://github.com/coddingtonbear/python-measurement";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ bhipple ];
|
|
|
|
};
|
|
|
|
}
|