1{ lib
2, buildPythonPackage
3, fetchPypi
4, pbr
5, prettytable
6, pyparsing
7, six
8, stevedore
9, pyyaml
10, unicodecsv
11, cmd2
12, pytest
13, mock
14, testtools
15, fixtures
16}:
17
18buildPythonPackage rec {
19 pname = "cliff";
20 version = "2.17.0";
21
22 src = fetchPypi {
23 inherit pname version;
24 sha256 = "f5a1c6b32047aa0d272398d311fd711d41dd5e1cd5195ebe36ebb47f464416fa";
25 };
26
27 propagatedBuildInputs = [
28 pbr
29 prettytable
30 pyparsing
31 six
32 stevedore
33 pyyaml
34 cmd2
35 unicodecsv
36 ];
37
38 # remove version constraints
39 postPatch = ''
40 sed -i '/cmd2/c\cmd2' requirements.txt
41 '';
42
43 checkInputs = [ fixtures mock pytest testtools ];
44 # add some tests
45 checkPhase = ''
46 pytest cliff/tests/test_{utils,app,command,help,lister}.py \
47 -k 'not interactive_mode'
48 '';
49
50 meta = with lib; {
51 description = "Command Line Interface Formulation Framework";
52 homepage = https://docs.openstack.org/cliff/latest/;
53 license = licenses.asl20;
54 maintainers = [ maintainers.costrouc ];
55 };
56}