mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-11 08:03:16 -04:00
dev-python/anytree: add USE=dot, test dep on six, .gh suffix
- Fix PythonGHDistfileSuffix by adding .gh suffix to source archive. - Add `USE=dot` to optionally pull in `media-gfx/graphviz`, or otherwise disable related test. - Add `dev-python/six` dependency required by `USE=test`. Closes: https://bugs.gentoo.org/934415 Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
This commit is contained in:
@@ -7,17 +7,32 @@ PYTHON_COMPAT=( python3_{10..13} )
|
||||
DISTUTILS_USE_PEP517=poetry
|
||||
|
||||
inherit distutils-r1
|
||||
# inherit pypi
|
||||
|
||||
DESCRIPTION="Powerful and Lightweight Python Tree Data Structure with various plugins"
|
||||
HOMEPAGE="https://anytree.readthedocs.io/"
|
||||
|
||||
SRC_URI="https://github.com/c0fec0de/anytree/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
SRC_URI="https://github.com/c0fec0de/anytree/archive/refs/tags/${PV}.tar.gz -> ${P}.gh.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64 ~x86"
|
||||
|
||||
IUSE="dot"
|
||||
|
||||
RDEPEND="
|
||||
dot? (
|
||||
media-gfx/graphviz
|
||||
)
|
||||
"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
test? (
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/six[${PYTHON_USEDEP}]
|
||||
')
|
||||
)
|
||||
"
|
||||
|
||||
distutils_enable_sphinx docs
|
||||
distutils_enable_tests pytest
|
||||
|
||||
@@ -29,6 +44,14 @@ src_prepare(){
|
||||
|
||||
python_test() {
|
||||
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
local -x EPYTEST_DESELECT=()
|
||||
|
||||
if ! use dot; then
|
||||
EPYTEST_DESELECT+=(
|
||||
"tests/test_dotexport.py::test_tree_png"
|
||||
)
|
||||
fi
|
||||
|
||||
cd "${S}/tests" || die
|
||||
distutils-r1_python_test
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user