mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-12-01 21:57:42 -05:00
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>
49 lines
1.2 KiB
Bash
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
|
|
}
|