# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI="8"

DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{11..13} )

inherit distutils-r1

version="${PV%'.0'}"
DESCRIPTION="Naive XML & JSON Bindings for python."
HOMEPAGE="https://xsdata.readthedocs.io"
SRC_URI="https://github.com/tefra/${PN}/archive/refs/tags/v${version}.tar.gz -> ${P}.gh.tar.gz"
S="${WORKDIR}/${PN}-${version}"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
IUSE="cli lxml soap"
RESTRICT="mirror"

RDEPEND="
	cli? (
		>=dev-python/click-5[${PYTHON_USEDEP}]
		>=dev-python/click-default-group-1.2[${PYTHON_USEDEP}]
		dev-python/docformatter[${PYTHON_USEDEP}]
		>=dev-python/jinja2-2.10[${PYTHON_USEDEP}]
		>=dev-python/toposort-1.5[${PYTHON_USEDEP}]
		>=dev-util/ruff-0.9.8
	)
	lxml? ( >=dev-python/lxml-4.5.0[${PYTHON_USEDEP}] )
	soap? ( dev-python/requests[${PYTHON_USEDEP}] )
"
BDEPEND="test? (
	>=dev-python/click-5[${PYTHON_USEDEP}]
	>=dev-python/click-default-group-1.2[${PYTHON_USEDEP}]
	dev-python/docformatter[${PYTHON_USEDEP}]
	>=dev-python/jinja2-2.10[${PYTHON_USEDEP}]
	>=dev-python/lxml-4.5.0[${PYTHON_USEDEP}]
	dev-python/requests[${PYTHON_USEDEP}]
	>=dev-util/ruff-0.9.8
)"

distutils_enable_tests pytest