Files
gentoo/dev-python/tavern/tavern-2.6.0.ebuild
Michał Górny f5f8d97282 dev-python/tavern: Enable py3.12
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2023-11-19 09:08:29 +01:00

60 lines
1.3 KiB
Bash

# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=flit
PYTHON_COMPAT=( python3_{10..12} )
inherit distutils-r1
DESCRIPTION="A tool, library, and Pytest plugin for testing RESTful APIs"
HOMEPAGE="
https://github.com/taverntesting/tavern/
https://pypi.org/project/tavern/
"
SRC_URI="
https://github.com/taverntesting/tavern/archive/${PV}.tar.gz
-> ${P}.gh.tar.gz
"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="
dev-python/jmespath[${PYTHON_USEDEP}]
dev-python/paho-mqtt[${PYTHON_USEDEP}]
>=dev-python/pyjwt-2.6.0[${PYTHON_USEDEP}]
dev-python/pykwalify[${PYTHON_USEDEP}]
dev-python/pytest[${PYTHON_USEDEP}]
dev-python/python-box[${PYTHON_USEDEP}]
>=dev-python/pyyaml-6.0.1[${PYTHON_USEDEP}]
dev-python/requests[${PYTHON_USEDEP}]
dev-python/stevedore[${PYTHON_USEDEP}]
"
BDEPEND="
test? (
dev-python/colorlog[${PYTHON_USEDEP}]
dev-python/Faker[${PYTHON_USEDEP}]
dev-python/jsonschema[${PYTHON_USEDEP}]
)
"
distutils_enable_tests pytest
src_prepare() {
local PATCHES=(
"${FILESDIR}/${P}-py312.patch"
)
# strip unnecessary pins, upstream doesn't update them a lot
sed -i -E -e 's:,?<=?[0-9.]+::' pyproject.toml || die
distutils-r1_src_prepare
}
python_test() {
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
epytest -p tavern
}