summary refs log tree commit diff
path: root/pkgs/development/python-modules/clize/default.nix
blob: c9c3f5c905ceaf60ce430ea23cbca9afe4c7c94e (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{ lib, stdenv
, buildPythonPackage
, fetchPypi
, dateutil
, sigtools
, six
, attrs
, od
, docutils
, repeated_test
, pygments
, unittest2
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "clize";
  version = "4.1.1";

  src = fetchPypi {
    inherit pname version;
    sha256 = "f54dedcf6fea90a3e75c30cb65e0ab1e832760121f393b8d68edd711dbaf7187";
  };

  # Remove overly restrictive version constraints
  postPatch = ''
    substituteInPlace setup.py --replace "attrs>=19.1.0,<20" "attrs"
  '';

  checkInputs = [
    pytestCheckHook
    dateutil
    pygments
    repeated_test
    unittest2
  ];

  propagatedBuildInputs = [
    attrs
    docutils
    od
    sigtools
    six
  ];

  pythonImportsCheck = [ "clize" ];

  meta = with lib; {
    description = "Command-line argument parsing for Python";
    homepage = "https://github.com/epsy/clize";
    license = licenses.mit;
  };
}