python313Packages.traits: fix build (#373698)
[NixPkgs.git] / pkgs / development / python-modules / python-benedict / default.nix
blob8955938a3bc53a2f10c068412c35f35abdb5fc10
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,
26 buildPythonPackage rec {
27   pname = "python-benedict";
28   version = "0.34.0";
29   pyproject = true;
31   disabled = pythonOlder "3.10";
33   src = fetchFromGitHub {
34     owner = "fabiocaccamo";
35     repo = "python-benedict";
36     tag = version;
37     hash = "sha256-HQ9VVgRfF5qA36yOyKT63gXuKNLLjouqYKz5EuqGA2E=";
38   };
40   pythonRelaxDeps = [ "boto3" ];
42   build-system = [ setuptools ];
44   dependencies = [
45     python-fsutil
46     python-slugify
47     requests
48   ];
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   };
92   nativeCheckInputs = [
93     orjson
94     pytestCheckHook
95     python-decouple
96   ] ++ lib.flatten (builtins.attrValues optional-dependencies);
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   ];
113   pythonImportsCheck = [ "benedict" ];
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   };