Files
guru/dev-python/spdx-tools/spdx-tools-0.8.5-r1.ebuild
bakedsnake 6c78a9a768 dev-python/spdx-tools: enable tests
Enables tests, and adds "dev-python/uritools"  as a
runtime dependency.
Deals with non-byte compiled files generated by the
tests.

Signed-off-by: bakedsnake <bakedsnake@vagrantz.xyz>
2026-11-26 01:06:20 +01:00

49 lines
1.2 KiB
Bash

# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{13..14} ) # no python3_15 because of beartype
inherit distutils-r1 pypi
DESCRIPTION="A Python library to parse, validate and create SPDX documents"
HOMEPAGE="
https://github.com/spdx/tools-python
https://pypi.org/project/spdx-tools/
"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="
dev-python/beartype[${PYTHON_USEDEP}]
dev-python/click[${PYTHON_USEDEP}]
dev-python/license-expression[${PYTHON_USEDEP}]
dev-python/ply[${PYTHON_USEDEP}]
dev-python/pyyaml[${PYTHON_USEDEP}]
dev-python/rdflib[${PYTHON_USEDEP}]
dev-python/semantic-version[${PYTHON_USEDEP}]
dev-python/uritools[${PYTHON_USEDEP}]
dev-python/xmltodict[${PYTHON_USEDEP}]
"
EPYTEST_PLUGINS=( )
distutils_enable_tests pytest
python_test() {
# pyshacl not available
EPYTEST_IGNORE=(
tests/spdx3/validation/json_ld/test_shacl_validation.py
)
epytest
# Remove non-byte compiled, generated by tests, and not required.
local py_sitedir="${BUILD_DIR}/install$(python_get_sitedir)"
rm -f "${py_sitedir}"/spdx_tools/spdx/parser/tagvalue/{parsetab.py,parser.out} || die
}