From: Louis Sautier Date: Fri, 22 May 2020 21:58:46 +0000 (+0200) Subject: dev-python/geventhttpclient: do not install tests X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4194c01ed1501a5f0771185ff591c860ab2e4f33;p=gentoo.git dev-python/geventhttpclient: do not install tests Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Louis Sautier --- diff --git a/dev-python/geventhttpclient/files/geventhttpclient-1.4.0-dont-install-tests.patch b/dev-python/geventhttpclient/files/geventhttpclient-1.4.0-dont-install-tests.patch new file mode 100644 index 000000000000..395628dc40f8 --- /dev/null +++ b/dev-python/geventhttpclient/files/geventhttpclient-1.4.0-dont-install-tests.patch @@ -0,0 +1,18 @@ +commit 6577190f64072c669c579c78225e23fe79edd90e +Author: Louis Sautier +Date: Fri May 22 23:36:38 2020 +0200 + + Do not install tests + +diff --git a/setup.py b/setup.py +index 6e7a924..c896644 100644 +--- a/setup.py ++++ b/setup.py +@@ -50,6 +50,7 @@ setup(name='geventhttpclient', + author="Antonin Amand", + author_email="antonin.amand@gmail.com", + packages=find_packages('src'), ++ exclude_package_data={'geventhttpclient': ['tests/*']}, + license='LICENSE-MIT', + package_dir={'': 'src'}, + ext_modules = [httpparser], diff --git a/dev-python/geventhttpclient/geventhttpclient-1.4.0.ebuild b/dev-python/geventhttpclient/geventhttpclient-1.4.0-r1.ebuild similarity index 71% rename from dev-python/geventhttpclient/geventhttpclient-1.4.0.ebuild rename to dev-python/geventhttpclient/geventhttpclient-1.4.0-r1.ebuild index f65c04601751..9f4094bf13b5 100644 --- a/dev-python/geventhttpclient/geventhttpclient-1.4.0.ebuild +++ b/dev-python/geventhttpclient/geventhttpclient-1.4.0-r1.ebuild @@ -29,6 +29,10 @@ BDEPEND=" ) " +# Do not install tests +# https://github.com/gwik/geventhttpclient/pull/126 +PATCHES=( "${FILESDIR}/${P}-dont-install-tests.patch" ) + python_prepare_all() { # Skip SNI tests which require dpkt sed -i '/^import dpkt.ssl/d' src/geventhttpclient/tests/test_ssl.py || die @@ -37,14 +41,6 @@ python_prepare_all() { python_test() { local skipped_tests=( - # Require network access - src/geventhttpclient/tests/test_client.py::test_client_simple - src/geventhttpclient/tests/test_client.py::test_client_without_leading_slash - src/geventhttpclient/tests/test_client.py::test_request_with_headers - src/geventhttpclient/tests/test_client.py::test_response_context_manager - src/geventhttpclient/tests/test_client.py::test_client_ssl - src/geventhttpclient/tests/test_client.py::test_ssl_fail_invalid_certificate - src/geventhttpclient/tests/test_client.py::test_multi_queries_greenlet_safe # Require dpkg src/geventhttpclient/tests/test_ssl.py::test_implicit_sni_from_host_in_ssl src/geventhttpclient/tests/test_ssl.py::test_implicit_sni_from_header_in_ssl @@ -52,6 +48,7 @@ python_test() { ) # Append to sys.path to avoid ImportError # https://bugs.gentoo.org/667758 + # Skip tests which require internet access pytest --import-mode=append -vv ${skipped_tests[@]/#/--deselect } \ - || die "Tests failed with ${EPYTHON}" + -m "not online" || die "Tests failed with ${EPYTHON}" }