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