2019-11-09 16:39:00 +00:00
|
|
|
{ lib, fetchFromGitHub, buildPythonPackage, isPy3k
|
2021-07-20 22:07:53 +01:00
|
|
|
, sympy, pytest, pytest-runner, sphinx, setuptools-scm }:
|
2019-07-07 20:09:17 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "measurement";
|
2019-12-19 19:31:15 +00:00
|
|
|
version = "3.2.0";
|
2019-07-07 20:09:17 +01:00
|
|
|
|
2019-11-09 16:39:00 +00:00
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "coddingtonbear";
|
|
|
|
repo = "python-measurement";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "1mk9qg1q4cnnipr6xa72i17qvwwhz2hd8p4vlsa9gdzrcv4vr8h9";
|
2019-07-07 20:09:17 +01:00
|
|
|
};
|
|
|
|
|
2019-11-09 16:39:00 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i 's|use_scm_version=True|version="${version}"|' setup.py
|
|
|
|
'';
|
|
|
|
|
2021-07-20 22:07:53 +01:00
|
|
|
checkInputs = [ pytest pytest-runner ];
|
2021-06-03 11:09:11 +01:00
|
|
|
nativeBuildInputs = [ sphinx setuptools-scm ];
|
2019-11-09 16:39:00 +00:00
|
|
|
propagatedBuildInputs = [ sympy ];
|
2019-07-07 20:09:17 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Use and manipulate unit-aware measurement objects in Python";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/coddingtonbear/python-measurement";
|
2019-07-07 20:09:17 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ bhipple ];
|
|
|
|
};
|
|
|
|
}
|