biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / xsdata / default.nix
blob96c32ac9349a269a5606e36d94a1ea01e4029123
2   lib,
3   buildPythonPackage,
4   pythonOlder,
5   fetchFromGitHub,
6   substituteAll,
7   ruff,
8   click,
9   click-default-group,
10   docformatter,
11   jinja2,
12   toposort,
13   typing-extensions,
14   lxml,
15   requests,
16   pytestCheckHook,
17   setuptools,
20 buildPythonPackage rec {
21   pname = "xsdata";
22   version = "24.9";
23   pyproject = true;
25   disabled = pythonOlder "3.8";
27   src = fetchFromGitHub {
28     owner = "tefra";
29     repo = "xsdata";
30     rev = "refs/tags/v${version}";
31     hash = "sha256-wQSrdAS4E6AmpP+pKviFomLrcSHLROhTWHg/hYGTaeQ=";
32   };
34   patches = [
35     (substituteAll {
36       src = ./paths.patch;
37       ruff = lib.getExe ruff;
38     })
39   ];
41   postPatch = ''
42     substituteInPlace pyproject.toml \
43       --replace-fail "--benchmark-skip" ""
44   '';
46   build-system = [ setuptools ];
48   dependencies = [ typing-extensions ];
50   optional-dependencies = {
51     cli = [
52       click
53       click-default-group
54       docformatter
55       jinja2
56       toposort
57     ];
58     lxml = [ lxml ];
59     soap = [ requests ];
60   };
62   nativeCheckInputs = [
63     pytestCheckHook
64   ] ++ optional-dependencies.cli ++ optional-dependencies.lxml ++ optional-dependencies.soap;
66   disabledTestPaths = [ "tests/integration/benchmarks" ];
68   pythonImportsCheck = [
69     "xsdata.formats.dataclass.context"
70     "xsdata.formats.dataclass.models.elements"
71     "xsdata.formats.dataclass.models.generics"
72     "xsdata.formats.dataclass.parsers"
73     "xsdata.formats.dataclass.parsers.handlers"
74     "xsdata.formats.dataclass.parsers.nodes"
75     "xsdata.formats.dataclass.serializers"
76     "xsdata.formats.dataclass.serializers.config"
77     "xsdata.formats.dataclass.serializers.mixins"
78     "xsdata.formats.dataclass.serializers.writers"
79     "xsdata.models.config"
80     "xsdata.utils.text"
81   ];
83   meta = {
84     description = "Naive XML & JSON bindings for Python";
85     mainProgram = "xsdata";
86     homepage = "https://github.com/tefra/xsdata";
87     changelog = "https://github.com/tefra/xsdata/blob/${src.rev}/CHANGES.md";
88     license = lib.licenses.mit;
89     maintainers = with lib.maintainers; [ dotlambda ];
90   };