1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 mock, 6 pytestCheckHook, 7 pyyaml, 8 pythonAtLeast, 9 pythonOlder, 10}: 11 12buildPythonPackage rec { 13 pname = "configargparse"; 14 version = "1.7.1"; 15 format = "setuptools"; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchFromGitHub { 20 owner = "bw2"; 21 repo = "ConfigArgParse"; 22 tag = version; 23 hash = "sha256-wrWfQzr0smM83helOEJPbayrEpAtXJYYXIw4JnGLNho="; 24 }; 25 26 optional-dependencies = { 27 yaml = [ pyyaml ]; 28 }; 29 30 nativeCheckInputs = [ 31 pytestCheckHook 32 mock 33 ] 34 ++ lib.flatten (lib.attrValues optional-dependencies); 35 36 disabledTests = lib.optionals (pythonAtLeast "3.13") [ 37 # regex mismatch 38 "testMutuallyExclusiveArgs" 39 ]; 40 41 pythonImportsCheck = [ "configargparse" ]; 42 43 meta = with lib; { 44 description = "Drop-in replacement for argparse"; 45 homepage = "https://github.com/bw2/ConfigArgParse"; 46 changelog = "https://github.com/bw2/ConfigArgParse/releases/tag/${src.tag}"; 47 license = licenses.mit; 48 maintainers = [ ]; 49 }; 50}