1 |
commit: 4194c01ed1501a5f0771185ff591c860ab2e4f33 |
2 |
Author: Louis Sautier <sbraz <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri May 22 21:58:46 2020 +0000 |
4 |
Commit: Louis Sautier <sbraz <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri May 22 22:04:07 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4194c01e |
7 |
|
8 |
dev-python/geventhttpclient: do not install tests |
9 |
|
10 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
11 |
Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org> |
12 |
|
13 |
.../geventhttpclient-1.4.0-dont-install-tests.patch | 18 ++++++++++++++++++ |
14 |
...t-1.4.0.ebuild => geventhttpclient-1.4.0-r1.ebuild} | 15 ++++++--------- |
15 |
2 files changed, 24 insertions(+), 9 deletions(-) |
16 |
|
17 |
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 |
18 |
new file mode 100644 |
19 |
index 00000000000..395628dc40f |
20 |
--- /dev/null |
21 |
+++ b/dev-python/geventhttpclient/files/geventhttpclient-1.4.0-dont-install-tests.patch |
22 |
@@ -0,0 +1,18 @@ |
23 |
+commit 6577190f64072c669c579c78225e23fe79edd90e |
24 |
+Author: Louis Sautier <sautier.louis@×××××.com> |
25 |
+Date: Fri May 22 23:36:38 2020 +0200 |
26 |
+ |
27 |
+ Do not install tests |
28 |
+ |
29 |
+diff --git a/setup.py b/setup.py |
30 |
+index 6e7a924..c896644 100644 |
31 |
+--- a/setup.py |
32 |
++++ b/setup.py |
33 |
+@@ -50,6 +50,7 @@ setup(name='geventhttpclient', |
34 |
+ author="Antonin Amand", |
35 |
+ author_email="antonin.amand@×××××.com", |
36 |
+ packages=find_packages('src'), |
37 |
++ exclude_package_data={'geventhttpclient': ['tests/*']}, |
38 |
+ license='LICENSE-MIT', |
39 |
+ package_dir={'': 'src'}, |
40 |
+ ext_modules = [httpparser], |
41 |
|
42 |
diff --git a/dev-python/geventhttpclient/geventhttpclient-1.4.0.ebuild b/dev-python/geventhttpclient/geventhttpclient-1.4.0-r1.ebuild |
43 |
similarity index 71% |
44 |
rename from dev-python/geventhttpclient/geventhttpclient-1.4.0.ebuild |
45 |
rename to dev-python/geventhttpclient/geventhttpclient-1.4.0-r1.ebuild |
46 |
index f65c0460175..9f4094bf13b 100644 |
47 |
--- a/dev-python/geventhttpclient/geventhttpclient-1.4.0.ebuild |
48 |
+++ b/dev-python/geventhttpclient/geventhttpclient-1.4.0-r1.ebuild |
49 |
@@ -29,6 +29,10 @@ BDEPEND=" |
50 |
) |
51 |
" |
52 |
|
53 |
+# Do not install tests |
54 |
+# https://github.com/gwik/geventhttpclient/pull/126 |
55 |
+PATCHES=( "${FILESDIR}/${P}-dont-install-tests.patch" ) |
56 |
+ |
57 |
python_prepare_all() { |
58 |
# Skip SNI tests which require dpkt |
59 |
sed -i '/^import dpkt.ssl/d' src/geventhttpclient/tests/test_ssl.py || die |
60 |
@@ -37,14 +41,6 @@ python_prepare_all() { |
61 |
|
62 |
python_test() { |
63 |
local skipped_tests=( |
64 |
- # Require network access |
65 |
- src/geventhttpclient/tests/test_client.py::test_client_simple |
66 |
- src/geventhttpclient/tests/test_client.py::test_client_without_leading_slash |
67 |
- src/geventhttpclient/tests/test_client.py::test_request_with_headers |
68 |
- src/geventhttpclient/tests/test_client.py::test_response_context_manager |
69 |
- src/geventhttpclient/tests/test_client.py::test_client_ssl |
70 |
- src/geventhttpclient/tests/test_client.py::test_ssl_fail_invalid_certificate |
71 |
- src/geventhttpclient/tests/test_client.py::test_multi_queries_greenlet_safe |
72 |
# Require dpkg |
73 |
src/geventhttpclient/tests/test_ssl.py::test_implicit_sni_from_host_in_ssl |
74 |
src/geventhttpclient/tests/test_ssl.py::test_implicit_sni_from_header_in_ssl |
75 |
@@ -52,6 +48,7 @@ python_test() { |
76 |
) |
77 |
# Append to sys.path to avoid ImportError |
78 |
# https://bugs.gentoo.org/667758 |
79 |
+ # Skip tests which require internet access |
80 |
pytest --import-mode=append -vv ${skipped_tests[@]/#/--deselect } \ |
81 |
- || die "Tests failed with ${EPYTHON}" |
82 |
+ -m "not online" || die "Tests failed with ${EPYTHON}" |
83 |
} |