1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 isPy3k,
6 flit-core,
7 flit-scm,
8 sympy,
9 pytestCheckHook,
10 sphinx,
11}:
12
13buildPythonPackage rec {
14 pname = "measurement";
15 version = "4.0a8";
16 format = "pyproject";
17
18 disabled = !isPy3k;
19
20 src = fetchFromGitHub {
21 owner = "coddingtonbear";
22 repo = "python-measurement";
23 tag = version;
24 hash = "sha256-QxXxx9Jbx7ykQFaw/3S6ANPUmw3mhvSa4np6crsfVtE=";
25 };
26
27 nativeBuildInputs = [
28 flit-core
29 flit-scm
30 sphinx
31 ];
32
33 postPatch = ''
34 substituteInPlace pyproject.toml \
35 --replace "--cov=measurement" ""
36 '';
37
38 propagatedBuildInputs = [ sympy ];
39
40 nativeCheckInputs = [ pytestCheckHook ];
41
42 meta = {
43 description = "Use and manipulate unit-aware measurement objects in Python";
44 homepage = "https://github.com/coddingtonbear/python-measurement";
45 changelog = "https://github.com/coddingtonbear/python-measurement/releases/tag/${version}";
46 license = lib.licenses.mit;
47 maintainers = with lib.maintainers; [ bhipple ];
48 };
49}