summary refs log tree commit diff
path: root/pkgs/development/python-modules/measurement/default.nix
blob: b3a0430a93b91eed50551971382d77d152f8550e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ lib, fetchFromGitHub, buildPythonPackage, isPy3k
, sympy, pytest, pytestrunner, sphinx, setuptools_scm }:

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
  '';

  checkInputs = [ pytest pytestrunner ];
  nativeBuildInputs = [ sphinx setuptools_scm ];
  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 ];
  };
}