Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / xsdata / default.nix
blobb57fff4a94f03e43de2fe1de60c28d2fe9c27c84
1 { lib
2 , buildPythonPackage
3 , pythonOlder
4 , fetchFromGitHub
5 , substituteAll
6 , ruff
7 , click
8 , click-default-group
9 , docformatter
10 , jinja2
11 , toposort
12 , typing-extensions
13 , lxml
14 , requests
15 , pytestCheckHook
16 , setuptools
19 buildPythonPackage rec {
20   pname = "xsdata";
21   version = "24.2.1";
22   pyproject = true;
24   disabled = pythonOlder "3.8";
26   src = fetchFromGitHub {
27     owner = "tefra";
28     repo = "xsdata";
29     rev = "refs/tags/v${version}";
30     hash = "sha256-o3G0isXShwNHaOiA4TNml0IhStB3X4jB9CgrVKViBlY=";
31   };
33   patches = [
34     (substituteAll {
35       src = ./paths.patch;
36       ruff = lib.getExe ruff;
37     })
38   ];
40   postPatch = ''
41     substituteInPlace pyproject.toml \
42       --replace "--benchmark-skip" ""
43   '';
45   nativeBuildInputs = [
46     setuptools
47   ];
49   propagatedBuildInputs = [
50     typing-extensions
51   ];
53   passthru.optional-dependencies = {
54     cli = [
55       click
56       click-default-group
57       docformatter
58       jinja2
59       toposort
60     ];
61     lxml = [
62       lxml
63     ];
64     soap = [
65       requests
66     ];
67   };
69   nativeCheckInputs = [
70     pytestCheckHook
71   ] ++ passthru.optional-dependencies.cli
72     ++ passthru.optional-dependencies.lxml
73     ++ passthru.optional-dependencies.soap;
75   disabledTestPaths = [
76     "tests/integration/benchmarks"
77   ];
79   pythonImportsCheck = [
80     "xsdata.formats.dataclass.context"
81     "xsdata.formats.dataclass.models.elements"
82     "xsdata.formats.dataclass.models.generics"
83     "xsdata.formats.dataclass.parsers"
84     "xsdata.formats.dataclass.parsers.handlers"
85     "xsdata.formats.dataclass.parsers.nodes"
86     "xsdata.formats.dataclass.serializers"
87     "xsdata.formats.dataclass.serializers.config"
88     "xsdata.formats.dataclass.serializers.mixins"
89     "xsdata.formats.dataclass.serializers.writers"
90     "xsdata.models.config"
91     "xsdata.utils.text"
92   ];
94   meta = {
95     description = "Naive XML & JSON bindings for Python";
96     mainProgram = "xsdata";
97     homepage = "https://github.com/tefra/xsdata";
98     changelog = "https://github.com/tefra/xsdata/blob/${src.rev}/CHANGES.md";
99     license = lib.licenses.mit;
100     maintainers = with lib.maintainers; [ dotlambda ];
101   };