1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 poetry-core, 8 poetry-dynamic-versioning, 9 10 # dependencies 11 docstring-parser, 12 typing-extensions, 13 14 # optional-dependencies 15 tomli, 16 tomli-w, 17 pyyaml, 18 19 # tests 20 matplotlib, 21 numpy, 22 orion, 23 pytest-benchmark, 24 pytest-regressions, 25 pytestCheckHook, 26}: 27 28buildPythonPackage rec { 29 pname = "simple-parsing"; 30 version = "0.1.7"; 31 pyproject = true; 32 33 src = fetchFromGitHub { 34 owner = "lebrice"; 35 repo = "SimpleParsing"; 36 tag = "v${version}"; 37 hash = "sha256-wHk3osr5CNmA/g9ipLy1dgvJoMy1zE/BAGD9ZATE+tc="; 38 }; 39 40 build-system = [ 41 poetry-core 42 poetry-dynamic-versioning 43 ]; 44 45 dependencies = [ 46 docstring-parser 47 typing-extensions 48 ]; 49 50 optional-dependencies = { 51 toml = [ 52 tomli 53 tomli-w 54 ]; 55 yaml = [ pyyaml ]; 56 }; 57 58 pythonImportsCheck = [ "simple_parsing" ]; 59 60 nativeCheckInputs = [ 61 matplotlib 62 numpy 63 orion 64 pytest-benchmark 65 pytest-regressions 66 pytestCheckHook 67 ]; 68 69 pytestFlags = [ "--benchmark-disable" ]; 70 71 disabledTests = [ 72 # AssertionError 73 # https://github.com/lebrice/SimpleParsing/issues/338 74 "test_bool_args_in_help" 75 "test_desc_from_cls_docstring" 76 "test_docstring_builds_upon_bases" 77 "test_help_string" 78 "test_help_string_displays_default_factory_arguments" 79 "test_help_takes_value_from_docstring" 80 "test_issue_48" 81 "test_running_example_outputs_expected_without_arg" 82 "test_subgroup_partial_with_nested_field" 83 "test_weird_docstring_with_field_like" 84 ]; 85 86 meta = { 87 description = "Simple, Elegant, Typed Argument Parsing with argparse"; 88 changelog = "https://github.com/lebrice/SimpleParsing/releases/tag/v${version}"; 89 homepage = "https://github.com/lebrice/SimpleParsing"; 90 license = lib.licenses.mit; 91 maintainers = with lib.maintainers; [ GaetanLepage ]; 92 }; 93}