dev-python/hypercorn: ebuild maintenance

Closes: https://bugs.gentoo.org/784044
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2021-07-05 03:20:16 +02:00
parent d5b78154dd
commit d60b2ff1e3
2 changed files with 15 additions and 12 deletions

View File

@@ -0,0 +1,9 @@
--- a/setup.cfg
+++ b/setup.cfg
@@ -43,5 +43,5 @@
ignore_missing_imports = True
[tool:pytest]
-addopts = --no-cov-on-fail --showlocals
+addopts = --showlocals
testpaths = tests

View File

@@ -3,20 +3,20 @@
EAPI=7
PYTHON_COMPAT=( python3_{7,8,9} )
DISTUTILS_USE_SETUPTOOLS=rdepend
DOCS_BUILDER="sphinx"
DOCS_DEPEND="
dev-python/sphinxcontrib-napoleon
dev-python/pydata-sphinx-theme
"
DOCS_DIR="${S}/docs"
PYTHON_COMPAT=( python3_{8..9} )
inherit distutils-r1 docs optfeature
DESCRIPTION="ASGI Server based on Hyper libraries and inspired by Gunicorn"
HOMEPAGE="
https://pgjones.gitlab.io/hypercorn
https://gitlab.com/pgjones/hypercorn
https://github.com/pgjones/hypercorn
https://pypi.org/project/Hypercorn
@@ -33,29 +33,23 @@ RDEPEND="
dev-python/priority[${PYTHON_USEDEP}]
dev-python/toml[${PYTHON_USEDEP}]
>=dev-python/wsproto-0.14.0[${PYTHON_USEDEP}]
$(python_gen_cond_dep 'dev-python/typing-extensions[${PYTHON_USEDEP}]' python3_7)
"
BDEPEND="
test? (
dev-python/hypothesis[${PYTHON_USEDEP}]
>=dev-python/mock-4[${PYTHON_USEDEP}]
<dev-python/pytest-6[${PYTHON_USEDEP}]
dev-python/pytest-asyncio[${PYTHON_USEDEP}]
dev-python/pytest-trio[${PYTHON_USEDEP}]
dev-python/trio[${PYTHON_USEDEP}]
)
"
PATCHES=( "${FILESDIR}/${P}-no-coverage.patch" )
distutils_enable_tests pytest
python_prepare_all() {
# do not install LICENSE to /usr/
sed -i -e '/data_files/d' setup.py || die
# Remove pytest-cov dep
sed -i -e '/addopts/d' setup.cfg || die
distutils-r1_python_prepare_all
python_test() {
epytest -vv --deselect tests/trio/test_keep_alive.py::test_http1_keep_alive_pre_request || die
}
pkg_postinst() {