1 |
commit: 16bc3db95e54f77749c40803fc26bb9ea21d0ba6 |
2 |
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Mar 31 18:03:56 2020 +0000 |
4 |
Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net> |
5 |
CommitDate: Tue Mar 31 18:30:12 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=16bc3db9 |
7 |
|
8 |
dev-python/aiohttp-cors: treecleaned package |
9 |
|
10 |
Package-Manager: Portage-2.3.96, Repoman-2.3.22 |
11 |
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com> |
12 |
|
13 |
dev-python/aiohttp-cors/Manifest | 1 + |
14 |
dev-python/aiohttp-cors/aiohttp-cors-0.7.0.ebuild | 35 ++++++++++++ |
15 |
.../files/aiohttp-cors-0.7.0-tests.patch | 66 ++++++++++++++++++++++ |
16 |
dev-python/aiohttp-cors/metadata.xml | 8 +++ |
17 |
4 files changed, 110 insertions(+) |
18 |
|
19 |
diff --git a/dev-python/aiohttp-cors/Manifest b/dev-python/aiohttp-cors/Manifest |
20 |
new file mode 100644 |
21 |
index 0000000..4912de9 |
22 |
--- /dev/null |
23 |
+++ b/dev-python/aiohttp-cors/Manifest |
24 |
@@ -0,0 +1 @@ |
25 |
+DIST aiohttp-cors-0.7.0.tar.gz 39728 BLAKE2B 747499856272f551cf8e2e0911ff7cbb2c7cb8a1f3159327dd8f0d40cabbbd9713a1a9e30ef9c99f3f9642567c99025e049db837c89f907d6698a27005ac2632 SHA512 72e0b365b952c08a02c1123d7672cfea01063e2ff01743a71e10f804d22178edc0f1c6b7f87b7ed484ca7c24e89a32de90d0d279f2f5c060427319182f9bdd3b |
26 |
|
27 |
diff --git a/dev-python/aiohttp-cors/aiohttp-cors-0.7.0.ebuild b/dev-python/aiohttp-cors/aiohttp-cors-0.7.0.ebuild |
28 |
new file mode 100644 |
29 |
index 0000000..bcc2930 |
30 |
--- /dev/null |
31 |
+++ b/dev-python/aiohttp-cors/aiohttp-cors-0.7.0.ebuild |
32 |
@@ -0,0 +1,35 @@ |
33 |
+# Copyright 1999-2020 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=7 |
37 |
+ |
38 |
+PYTHON_COMPAT=( python3_6 ) |
39 |
+ |
40 |
+inherit distutils-r1 |
41 |
+ |
42 |
+DESCRIPTION="Implements CORS support for aiohttp asyncio-powered asynchronous HTTP server" |
43 |
+HOMEPAGE="https://github.com/aio-libs/aiohttp-cors" |
44 |
+SRC_URI="https://github.com/aio-libs/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
45 |
+EGIT_REPO_URI="https://github.com/aio-libs/aiohttp-cors" |
46 |
+ |
47 |
+LICENSE="Apache-2.0" |
48 |
+SLOT="0" |
49 |
+KEYWORDS="~amd64 ~x86" |
50 |
+ |
51 |
+RDEPEND=">=dev-python/aiohttp-1.1.1[${PYTHON_USEDEP}]" |
52 |
+BDEPEND=" |
53 |
+ test? ( |
54 |
+ dev-python/pytest-aiohttp[${PYTHON_USEDEP}] |
55 |
+ dev-python/selenium[${PYTHON_USEDEP}] |
56 |
+ )" |
57 |
+ |
58 |
+distutils_enable_tests pytest |
59 |
+ |
60 |
+PATCHES=( |
61 |
+ "${FILESDIR}"/aiohttp-cors-0.7.0-tests.patch |
62 |
+) |
63 |
+ |
64 |
+src_prepare() { |
65 |
+ sed -i -e '/^addopts=/d' setup.cfg || die |
66 |
+ distutils-r1_src_prepare |
67 |
+} |
68 |
|
69 |
diff --git a/dev-python/aiohttp-cors/files/aiohttp-cors-0.7.0-tests.patch b/dev-python/aiohttp-cors/files/aiohttp-cors-0.7.0-tests.patch |
70 |
new file mode 100644 |
71 |
index 0000000..e6480b5 |
72 |
--- /dev/null |
73 |
+++ b/dev-python/aiohttp-cors/files/aiohttp-cors-0.7.0-tests.patch |
74 |
@@ -0,0 +1,66 @@ |
75 |
+From fed5542836c6afa925f3b607d544a92307c5e09f Mon Sep 17 00:00:00 2001 |
76 |
+From: Andrew Svetlov <andrew.svetlov@×××××.com> |
77 |
+Date: Mon, 15 Oct 2018 21:32:48 +0300 |
78 |
+Subject: [PATCH] Fix tests |
79 |
+ |
80 |
+--- |
81 |
+ tests/integration/test_real_browser.py | 18 ++++++++---------- |
82 |
+ tests/unit/test_cors_config.py | 5 ++--- |
83 |
+ 2 files changed, 10 insertions(+), 13 deletions(-) |
84 |
+ |
85 |
+diff --git a/tests/integration/test_real_browser.py b/tests/integration/test_real_browser.py |
86 |
+index a5c9030..5dff79a 100644 |
87 |
+--- a/tests/integration/test_real_browser.py |
88 |
++++ b/tests/integration/test_real_browser.py |
89 |
+@@ -193,22 +193,20 @@ class IntegrationServers: |
90 |
+ |
91 |
+ # Start servers. |
92 |
+ for server_name, server_descr in self.servers.items(): |
93 |
+- handler = server_descr.app.make_handler() |
94 |
+- server = await self.loop.create_server( |
95 |
+- handler, |
96 |
+- sock=server_sockets[server_name]) |
97 |
+- server_descr.handler = handler |
98 |
+- server_descr.server = server |
99 |
++ runner = web.AppRunner(server_descr.app) |
100 |
++ await runner.setup() |
101 |
++ site = web.SockSite(runner, server_sockets[server_name]) |
102 |
++ await site.start() |
103 |
++ server_descr.runner = runner |
104 |
+ |
105 |
+ self._logger.info("Started server '%s' at '%s'", |
106 |
+ server_name, server_descr.url) |
107 |
+ |
108 |
+ async def stop_servers(self): |
109 |
+ for server_descr in self.servers.values(): |
110 |
+- server_descr.server.close() |
111 |
+- await server_descr.handler.shutdown() |
112 |
+- await server_descr.server.wait_closed() |
113 |
+- await server_descr.app.cleanup() |
114 |
++ runner = server_descr.runner |
115 |
++ await runner.shutdown() |
116 |
++ await runner.cleanup() |
117 |
+ |
118 |
+ self.servers = {} |
119 |
+ |
120 |
+diff --git a/tests/unit/test_cors_config.py b/tests/unit/test_cors_config.py |
121 |
+index 5b8d8f3..817410e 100644 |
122 |
+--- a/tests/unit/test_cors_config.py |
123 |
++++ b/tests/unit/test_cors_config.py |
124 |
+@@ -58,11 +58,10 @@ def options_route(app): |
125 |
+ "OPTIONS", "/options_path", _handler) |
126 |
+ |
127 |
+ |
128 |
+-def test_add_options_route(cors, options_route): |
129 |
++def test_add_options_route(app, cors, options_route): |
130 |
+ """Test configuring OPTIONS route""" |
131 |
+- |
132 |
+ with pytest.raises(ValueError, |
133 |
+- match="/options_path already has OPTIONS handler"): |
134 |
++ match="already has OPTIONS handler"): |
135 |
+ cors.add(options_route.resource) |
136 |
+ |
137 |
+ |
138 |
+-- |
139 |
+2.25.1 |
140 |
+ |
141 |
|
142 |
diff --git a/dev-python/aiohttp-cors/metadata.xml b/dev-python/aiohttp-cors/metadata.xml |
143 |
new file mode 100644 |
144 |
index 0000000..90e51cd |
145 |
--- /dev/null |
146 |
+++ b/dev-python/aiohttp-cors/metadata.xml |
147 |
@@ -0,0 +1,8 @@ |
148 |
+<?xml version="1.0" encoding="UTF-8"?> |
149 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
150 |
+<pkgmetadata> |
151 |
+ <!-- maintainer-needed --> |
152 |
+ <upstream> |
153 |
+ <remote-id type="github">aio-libs/aiohttp-cors</remote-id> |
154 |
+ </upstream> |
155 |
+</pkgmetadata> |