1{ lib, fetchFromGitHub, buildPythonPackage, isPy3k
2, sympy, pytest, pytest-runner, sphinx, setuptools-scm }:
3
4buildPythonPackage rec {
5 pname = "measurement";
6 version = "3.2.0";
7
8 disabled = !isPy3k;
9
10 src = fetchFromGitHub {
11 owner = "coddingtonbear";
12 repo = "python-measurement";
13 rev = version;
14 sha256 = "1mk9qg1q4cnnipr6xa72i17qvwwhz2hd8p4vlsa9gdzrcv4vr8h9";
15 };
16
17 postPatch = ''
18 sed -i 's|use_scm_version=True|version="${version}"|' setup.py
19 '';
20
21 checkInputs = [ pytest pytest-runner ];
22 nativeBuildInputs = [ sphinx setuptools-scm ];
23 propagatedBuildInputs = [ sympy ];
24
25 meta = with lib; {
26 description = "Use and manipulate unit-aware measurement objects in Python";
27 homepage = "https://github.com/coddingtonbear/python-measurement";
28 license = licenses.mit;
29 maintainers = with maintainers; [ bhipple ];
30 };
31}