summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-06-21 11:57:20 +0200
committerMichał Górny <mgorny@gentoo.org>2020-06-21 12:16:39 +0200
commitc59e651c250d37e814f6e1c69bab05b430061e8d (patch)
tree222e8be7f077558ef3d932ded3dc0f9c215cb08e /dev-python
parentdev-python/requests-unixsocket: New test-dep of cheroot (diff)
downloadgentoo-c59e651c250d37e814f6e1c69bab05b430061e8d.tar.gz
gentoo-c59e651c250d37e814f6e1c69bab05b430061e8d.tar.bz2
gentoo-c59e651c250d37e814f6e1c69bab05b430061e8d.zip
dev-python/cheroot: Enable tests
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/cheroot/cheroot-8.3.0-r1.ebuild52
1 files changed, 52 insertions, 0 deletions
diff --git a/dev-python/cheroot/cheroot-8.3.0-r1.ebuild b/dev-python/cheroot/cheroot-8.3.0-r1.ebuild
new file mode 100644
index 000000000000..b5bbaf91d370
--- /dev/null
+++ b/dev-python/cheroot/cheroot-8.3.0-r1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+DISTUTILS_USE_SETUPTOOLS=rdepend
+inherit distutils-r1
+
+DESCRIPTION="Cheroot is the high-performance, pure-Python HTTP server used by CherryPy."
+HOMEPAGE="https://cherrypy.org/ https://pypi.org/project/Cheroot/ https://github.com/cherrypy/cheroot"
+SRC_URI="mirror://pypi/C/${PN/c/C}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ >=dev-python/six-1.11.0[${PYTHON_USEDEP}]
+ >=dev-python/more-itertools-2.6[${PYTHON_USEDEP}]
+ dev-python/jaraco-functools[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ ${RDEPEND}
+ dev-python/jaraco-text[${PYTHON_USEDEP}]
+ >=dev-python/pytest-mock-1.11.0[${PYTHON_USEDEP}]
+ dev-python/pyopenssl[${PYTHON_USEDEP}]
+ dev-python/requests-unixsocket[${PYTHON_USEDEP}]
+ dev-python/trustme[${PYTHON_USEDEP}]
+ dev-python/urllib3[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
+
+python_prepare_all() {
+ sed -e "s/use_scm_version=True/version='${PV}'/" -i setup.py || die
+ sed -e '/setuptools_scm/d' -i setup.cfg || die
+ sed -e '/--cov/d' \
+ -e '/--testmon/d' \
+ -e '/--numproc/d' \
+ -i pytest.ini || die
+
+ # broken
+ sed -e '/False.*localhost/d' \
+ -i cheroot/test/test_ssl.py || die
+ sed -e "s:'abstract', 'file':'file',:" \
+ -i cheroot/test/test_server.py || die
+
+ distutils-r1_python_prepare_all
+}