ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / fire / default.nix
blob252b180c4e065df1d37878a54acbbfb7c6cd27ab
1 { lib, buildPythonPackage, fetchFromGitHub, six, hypothesis, mock
2 , python-Levenshtein, pytest, termcolor, isPy27, enum34 }:
4 buildPythonPackage rec {
5   pname = "fire";
6   version = "0.4.0";
8   src = fetchFromGitHub {
9     owner = "google";
10     repo = "python-fire";
11     rev = "v${version}";
12     sha256 = "1caz6j2kdhj0kccrnqri6b4g2d6wzkkx8y9vxyvm7axvrwkv2vyn";
13   };
15   propagatedBuildInputs = [ six termcolor ] ++ lib.optional isPy27 enum34;
17   checkInputs = [ hypothesis mock python-Levenshtein pytest ];
19   # ignore test which asserts exact usage statement, default behavior
20   # changed in python3.8. This can likely be remove >=0.3.1
21   checkPhase = ''
22     py.test -k 'not testInitRequiresFlag'
23   '';
25   meta = with lib; {
26     description = "A library for automatically generating command line interfaces";
27     longDescription = ''
28       Python Fire is a library for automatically generating command line
29       interfaces (CLIs) from absolutely any Python object.
31       * Python Fire is a simple way to create a CLI in Python.
33       * Python Fire is a helpful tool for developing and debugging
34         Python code.
36       * Python Fire helps with exploring existing code or turning other
37         people's code into a CLI.
39       * Python Fire makes transitioning between Bash and Python easier.
41       * Python Fire makes using a Python REPL easier by setting up the
42         REPL with the modules and variables you'll need already imported
43         and created.
44     '';
45     license = licenses.asl20;
46     maintainers = with maintainers; [ leenaars ];
47   };