1{ 2 lib, 3 boto3, 4 buildPythonPackage, 5 fetchFromGitHub, 6 ftfy, 7 mailchecker, 8 openpyxl, 9 orjson, 10 phonenumbers, 11 beautifulsoup4, 12 pytestCheckHook, 13 python-dateutil, 14 python-decouple, 15 python-fsutil, 16 python-slugify, 17 pythonOlder, 18 pyyaml, 19 requests, 20 setuptools, 21 toml, 22 xlrd, 23 xmltodict, 24}: 25 26buildPythonPackage rec { 27 pname = "python-benedict"; 28 version = "0.34.1"; 29 pyproject = true; 30 31 disabled = pythonOlder "3.10"; 32 33 src = fetchFromGitHub { 34 owner = "fabiocaccamo"; 35 repo = "python-benedict"; 36 tag = version; 37 hash = "sha256-ffmyTVeQKzV/sssxFuIckmBW6wmjnTWkHbVQ1v7fmGg="; 38 }; 39 40 pythonRelaxDeps = [ "boto3" ]; 41 42 build-system = [ setuptools ]; 43 44 dependencies = [ 45 python-fsutil 46 python-slugify 47 requests 48 ]; 49 50 optional-dependencies = { 51 all = [ 52 beautifulsoup4 53 boto3 54 ftfy 55 mailchecker 56 openpyxl 57 phonenumbers 58 python-dateutil 59 pyyaml 60 toml 61 xlrd 62 xmltodict 63 ]; 64 html = [ 65 beautifulsoup4 66 xmltodict 67 ]; 68 io = [ 69 beautifulsoup4 70 openpyxl 71 pyyaml 72 toml 73 xlrd 74 xmltodict 75 ]; 76 parse = [ 77 ftfy 78 mailchecker 79 phonenumbers 80 python-dateutil 81 ]; 82 s3 = [ boto3 ]; 83 toml = [ toml ]; 84 xls = [ 85 openpyxl 86 xlrd 87 ]; 88 xml = [ xmltodict ]; 89 yaml = [ pyyaml ]; 90 }; 91 92 nativeCheckInputs = [ 93 orjson 94 pytestCheckHook 95 python-decouple 96 ] ++ lib.flatten (builtins.attrValues optional-dependencies); 97 98 disabledTests = [ 99 # Tests require network access 100 "test_from_base64_with_valid_url_valid_content" 101 "test_from_html_with_valid_file_valid_content" 102 "test_from_html_with_valid_url_valid_content" 103 "test_from_json_with_valid_url_valid_content" 104 "test_from_pickle_with_valid_url_valid_content" 105 "test_from_plist_with_valid_url_valid_content" 106 "test_from_query_string_with_valid_url_valid_content" 107 "test_from_toml_with_valid_url_valid_content" 108 "test_from_xls_with_valid_url_valid_content" 109 "test_from_xml_with_valid_url_valid_content" 110 "test_from_yaml_with_valid_url_valid_content" 111 ]; 112 113 pythonImportsCheck = [ "benedict" ]; 114 115 meta = with lib; { 116 description = "Module with keylist/keypath support"; 117 homepage = "https://github.com/fabiocaccamo/python-benedict"; 118 changelog = "https://github.com/fabiocaccamo/python-benedict/blob/${version}/CHANGELOG.md"; 119 license = licenses.mit; 120 maintainers = with maintainers; [ fab ]; 121 }; 122}