1{ lib
2, buildPythonPackage
3, fetchPypi
4, pythonOlder
5, configobj
6, mock
7, pytestCheckHook
8, pygments
9, tabulate
10, terminaltables
11, wcwidth
12}:
13
14buildPythonPackage rec {
15 pname = "cli-helpers";
16 version = "2.3.0";
17 format = "setuptools";
18
19 disabled = pythonOlder "3.6";
20
21 src = fetchPypi {
22 pname = "cli_helpers";
23 inherit version;
24 hash = "sha256-5xdNADorWP0+Mac/u8RdWqUT3mLL1C1Df3i5ZYvV+Wc=";
25 };
26
27 propagatedBuildInputs = [
28 configobj
29 tabulate
30 ] ++ tabulate.optional-dependencies.widechars;
31
32 passthru.optional-dependencies = {
33 styles = [ pygments ];
34 };
35
36 nativeCheckInputs = [
37 pytestCheckHook
38 mock
39 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
40
41 meta = with lib; {
42 description = "Python helpers for common CLI tasks";
43 longDescription = ''
44 CLI Helpers is a Python package that makes it easy to perform common
45 tasks when building command-line apps. It's a helper library for
46 command-line interfaces.
47
48 Libraries like Click and Python Prompt Toolkit are amazing tools that
49 help you create quality apps. CLI Helpers complements these libraries by
50 wrapping up common tasks in simple interfaces.
51
52 CLI Helpers is not focused on your app's design pattern or framework --
53 you can use it on its own or in combination with other libraries. It's
54 lightweight and easy to extend.
55
56 What's included in CLI Helpers?
57
58 - Prettyprinting of tabular data with custom pre-processing
59 - [in progress] config file reading/writing
60
61 Read the documentation at http://cli-helpers.rtfd.io
62 '';
63 homepage = "https://cli-helpers.readthedocs.io/en/stable/";
64 license = licenses.bsd3 ;
65 maintainers = [ maintainers.kalbasit ];
66 };
67}