2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchPypi
|
2023-02-09 11:40:11 +00:00
|
|
|
, fetchpatch
|
2022-06-16 17:23:12 +00:00
|
|
|
, click
|
|
|
|
, click-default-group
|
|
|
|
, docformatter
|
|
|
|
, jinja2
|
|
|
|
, toposort
|
|
|
|
, lxml
|
|
|
|
, requests
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "xsdata";
|
2022-12-28 21:21:41 +00:00
|
|
|
version = "22.12";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-12-28 21:21:41 +00:00
|
|
|
hash = "sha256-o9Xxt7b/+MkW94Jcg26ihaTn0/OpTcu+0OY7oV3JRGY=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
patches = [
|
|
|
|
# https://github.com/tefra/xsdata/pull/741
|
|
|
|
(fetchpatch {
|
|
|
|
name = "use-docformatter-1.5.1.patch";
|
|
|
|
url = "https://github.com/tefra/xsdata/commit/040692db47e6e51028fd959c793e757858c392d7.patch";
|
|
|
|
excludes = [ "setup.cfg" ];
|
|
|
|
hash = "sha256-ncecMJLJUiUb4lB8ys+nyiGU/UmayK++o89h3sAwREQ=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "--benchmark-skip" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.optional-dependencies = {
|
|
|
|
cli = [
|
|
|
|
click
|
|
|
|
click-default-group
|
|
|
|
docformatter
|
|
|
|
jinja2
|
|
|
|
toposort
|
|
|
|
];
|
|
|
|
lxml = [
|
|
|
|
lxml
|
|
|
|
];
|
|
|
|
soap = [
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
pytestCheckHook
|
|
|
|
] ++ passthru.optional-dependencies.cli
|
|
|
|
++ passthru.optional-dependencies.lxml
|
|
|
|
++ passthru.optional-dependencies.soap;
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
"tests/integration/benchmarks"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"xsdata.formats.dataclass.context"
|
|
|
|
"xsdata.formats.dataclass.models.elements"
|
|
|
|
"xsdata.formats.dataclass.models.generics"
|
|
|
|
"xsdata.formats.dataclass.parsers"
|
|
|
|
"xsdata.formats.dataclass.parsers.handlers"
|
|
|
|
"xsdata.formats.dataclass.parsers.nodes"
|
|
|
|
"xsdata.formats.dataclass.serializers"
|
|
|
|
"xsdata.formats.dataclass.serializers.config"
|
|
|
|
"xsdata.formats.dataclass.serializers.mixins"
|
|
|
|
"xsdata.formats.dataclass.serializers.writers"
|
|
|
|
"xsdata.models.config"
|
|
|
|
"xsdata.utils.text"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Python XML Binding";
|
|
|
|
homepage = "https://github.com/tefra/xsdata";
|
2022-11-21 17:40:18 +00:00
|
|
|
changelog = "https://github.com/tefra/xsdata/blob/v${version}/CHANGES.rst";
|
2022-06-16 17:23:12 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|