1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 flit-core,
6 rich,
7 pytestCheckHook,
8 pythonOlder,
9}:
10
11buildPythonPackage rec {
12 pname = "rich-argparse-plus";
13 version = "0.3.1.4";
14 format = "pyproject";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "michelcrypt4d4mus";
20 repo = "rich-argparse-plus";
21 rev = "v${version}";
22 hash = "sha256-oF2wuvyLYwObVJ4fhJl9b/sdfmQ2ahgKkfd9ZwObfPw=";
23 };
24
25 nativeBuildInputs = [ flit-core ];
26
27 propagatedBuildInputs = [ rich ];
28
29 nativeCheckInputs = [ pytestCheckHook ];
30
31 pythonImportsCheck = [ "rich_argparse_plus" ];
32
33 disabledTests = [
34 # Tests are comparing CLI output
35 "test_spans"
36 "test_actions_spans_in_usage"
37 "test_boolean_optional_action_spans"
38 "test_usage_spans_errors"
39 "test_text_highlighter"
40 "test_default_highlights"
41 ];
42
43 meta = with lib; {
44 description = "Library to help formatting argparse";
45 homepage = "https://github.com/michelcrypt4d4mus/rich-argparse-plus";
46 changelog = "https://github.com/michelcrypt4d4mus/rich-argparse-plus/blob/${version}/CHANGELOG.md";
47 license = licenses.mit;
48 maintainers = with maintainers; [ fab ];
49 };
50}