summaryrefslogtreecommitdiff
path: root/dev-python/aiohttp-cors
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
commit623ee73d661e5ed8475cb264511f683407d87365 (patch)
tree993eb27c93ec7a2d2d19550300d888fc1fed9e69 /dev-python/aiohttp-cors
parentceeeb463cc1eef97fd62eaee8bf2196ba04bc384 (diff)
gentoo Easter resync : 12.04.2020
Diffstat (limited to 'dev-python/aiohttp-cors')
-rw-r--r--dev-python/aiohttp-cors/Manifest5
-rw-r--r--dev-python/aiohttp-cors/aiohttp-cors-0.6.0.ebuild42
-rw-r--r--dev-python/aiohttp-cors/aiohttp-cors-0.7.0.ebuild29
-rw-r--r--dev-python/aiohttp-cors/files/aiohttp-cors-0.7.0-tests.patch66
4 files changed, 79 insertions, 63 deletions
diff --git a/dev-python/aiohttp-cors/Manifest b/dev-python/aiohttp-cors/Manifest
index 4d336229d5d9..9aeb312d2dba 100644
--- a/dev-python/aiohttp-cors/Manifest
+++ b/dev-python/aiohttp-cors/Manifest
@@ -1,5 +1,4 @@
-DIST aiohttp-cors-0.6.0.tar.gz 42507 BLAKE2B 7b63916b983d3dc208058c8b04445a30762eebc4999135ae802d1ceeeccc476a335eae66126bb3fd16f938af3649e8b9096433c2df09e82bf4e5d4ba8e38c42c SHA512 75453ebbc074d5f25cc8efc46ffdb76fc90b0a96a9e6fce0eee5a5f28dba31cb50301289cac3b36c70ccdbc10c8f4ba9e362d8e9f350ba7f9dfacd06e6f5e699
+AUX aiohttp-cors-0.7.0-tests.patch 2422 BLAKE2B 4660be793987dd0cd5c945703aa4d6d4b499ba0ab1c305b80e26bac9cc87d811131f6ab179e402821740f193bbfc86a384b58e35aaa453fdfd5d4db3bcc44b23 SHA512 b3fa463b87a112529443f516fe1c37ffda092e8a0133a6d37f407519e32842f65773c87e939082591edb969ee243170be3a4828896ec5ffc1150c3f43aedd9d5
DIST aiohttp-cors-0.7.0.tar.gz 39728 BLAKE2B 747499856272f551cf8e2e0911ff7cbb2c7cb8a1f3159327dd8f0d40cabbbd9713a1a9e30ef9c99f3f9642567c99025e049db837c89f907d6698a27005ac2632 SHA512 72e0b365b952c08a02c1123d7672cfea01063e2ff01743a71e10f804d22178edc0f1c6b7f87b7ed484ca7c24e89a32de90d0d279f2f5c060427319182f9bdd3b
-EBUILD aiohttp-cors-0.6.0.ebuild 1139 BLAKE2B 7b0ab5b7e0a386a0edf0ebe385bbd26cda5a5610e04e28daa57175a4d6730db12c9dd7aca603f20a9bf74080c0faf2a76a141007b5c1db53314c9e4aaebad8b5 SHA512 b5a85cf1b96a2709ce94a2d71e5cb980cadc3b26625ab9758f85a3cd29dbec392a659b3a35744b547573a5315a788d46bf048bf11ccb00844ad1ebdde6fda228
-EBUILD aiohttp-cors-0.7.0.ebuild 1139 BLAKE2B 29d12899e458631773504fe4789d44fa472d5312e56bf2c79bc403125a24dbfdfedb1077f46df3fe1c597e7efe34ea7a478d5c7c082103e9d8e2e665233821f2 SHA512 a4c0599e648c98fb13c1317bb80cd02466ae254254288421f809cc81ca3a88245673e1747c3b0ee2abed215add0732d87c3c6fefa3539348981cfd47dfca8f30
+EBUILD aiohttp-cors-0.7.0.ebuild 842 BLAKE2B 4bbb7534da92f7c7cec32437581e0aaf0670d654319d81271cf5cb6d296928b05538958ab6f96d055bbb457cc5e218b8e4fe40645a67d4b1161ea2f771ef650f SHA512 dd3e95e9ff72ae87c0e1ea6bb4e161d1960553589b7a30ae2b9750d5bf9ae38f3e223181580a75220c36249929119dd54453a78fb7f061cc9bf90d21f773538b
MISC metadata.xml 253 BLAKE2B 0311910d10e4b501d39c01678bb1e58bed2e6e3252e6c3195d3284cf2e9652081b10a83f045689a56c69a4d318b209bfdac0a63ff6dab2a8fbb0160ac9c7e2e2 SHA512 bf75301ff2098e846a7d6dc9166d1c8b6e77b4f92327e5c5aad0edcde6274e6aa224d89c2c5ed7efc6fb7fcc7258a2a01a24591a43688679c4109f8cc89fd9b1
diff --git a/dev-python/aiohttp-cors/aiohttp-cors-0.6.0.ebuild b/dev-python/aiohttp-cors/aiohttp-cors-0.6.0.ebuild
deleted file mode 100644
index 771ee65952c0..000000000000
--- a/dev-python/aiohttp-cors/aiohttp-cors-0.6.0.ebuild
+++ /dev/null
@@ -1,42 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python3_{6,7} )
-
-inherit distutils-r1
-
-DESCRIPTION="Implements CORS support for aiohttp asyncio-powered asynchronous HTTP server"
-HOMEPAGE="https://github.com/aio-libs/aiohttp-cors"
-SRC_URI="https://github.com/aio-libs/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-EGIT_REPO_URI="https://github.com/aio-libs/aiohttp-cors"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-RDEPEND=">=dev-python/aiohttp-1.1.1[${PYTHON_USEDEP}]"
-DEPEND="${RDEPEND}
- dev-python/setuptools[${PYTHON_USEDEP}]
- test? (
- dev-python/pylint[${PYTHON_USEDEP}]
- dev-python/pytest[${PYTHON_USEDEP}]
- dev-python/pytest-cov[${PYTHON_USEDEP}]
- dev-python/pytest-pylint[${PYTHON_USEDEP}]
- dev-python/pytest-runner[${PYTHON_USEDEP}]
- dev-python/selenium[${PYTHON_USEDEP}]
- )"
-
-python_prepare_all() {
- # for some reason, it is installed by 'setup.py test' on py!=3.4
- # TODO: investigate
- sed -i -e '/typing/d' setup.py || die
- distutils-r1_python_prepare_all
-}
-
-python_test() {
- esetup.py test
-}
diff --git a/dev-python/aiohttp-cors/aiohttp-cors-0.7.0.ebuild b/dev-python/aiohttp-cors/aiohttp-cors-0.7.0.ebuild
index f02b23e4590a..bcc29302a0a0 100644
--- a/dev-python/aiohttp-cors/aiohttp-cors-0.7.0.ebuild
+++ b/dev-python/aiohttp-cors/aiohttp-cors-0.7.0.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-PYTHON_COMPAT=( python3_{6,7} )
+PYTHON_COMPAT=( python3_6 )
inherit distutils-r1
@@ -15,28 +15,21 @@ EGIT_REPO_URI="https://github.com/aio-libs/aiohttp-cors"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="test"
-RESTRICT="!test? ( test )"
RDEPEND=">=dev-python/aiohttp-1.1.1[${PYTHON_USEDEP}]"
-DEPEND="${RDEPEND}
- dev-python/setuptools[${PYTHON_USEDEP}]
+BDEPEND="
test? (
- dev-python/pylint[${PYTHON_USEDEP}]
- dev-python/pytest[${PYTHON_USEDEP}]
- dev-python/pytest-cov[${PYTHON_USEDEP}]
- dev-python/pytest-pylint[${PYTHON_USEDEP}]
- dev-python/pytest-runner[${PYTHON_USEDEP}]
+ dev-python/pytest-aiohttp[${PYTHON_USEDEP}]
dev-python/selenium[${PYTHON_USEDEP}]
)"
-python_prepare_all() {
- # for some reason, it is installed by 'setup.py test' on py!=3.4
- # TODO: investigate
- sed -i -e '/typing/d' setup.py || die
- distutils-r1_python_prepare_all
-}
+distutils_enable_tests pytest
+
+PATCHES=(
+ "${FILESDIR}"/aiohttp-cors-0.7.0-tests.patch
+)
-python_test() {
- esetup.py test
+src_prepare() {
+ sed -i -e '/^addopts=/d' setup.cfg || die
+ distutils-r1_src_prepare
}
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
new file mode 100644
index 000000000000..e6480b58ea68
--- /dev/null
+++ b/dev-python/aiohttp-cors/files/aiohttp-cors-0.7.0-tests.patch
@@ -0,0 +1,66 @@
+From fed5542836c6afa925f3b607d544a92307c5e09f Mon Sep 17 00:00:00 2001
+From: Andrew Svetlov <andrew.svetlov@gmail.com>
+Date: Mon, 15 Oct 2018 21:32:48 +0300
+Subject: [PATCH] Fix tests
+
+---
+ tests/integration/test_real_browser.py | 18 ++++++++----------
+ tests/unit/test_cors_config.py | 5 ++---
+ 2 files changed, 10 insertions(+), 13 deletions(-)
+
+diff --git a/tests/integration/test_real_browser.py b/tests/integration/test_real_browser.py
+index a5c9030..5dff79a 100644
+--- a/tests/integration/test_real_browser.py
++++ b/tests/integration/test_real_browser.py
+@@ -193,22 +193,20 @@ class IntegrationServers:
+
+ # Start servers.
+ for server_name, server_descr in self.servers.items():
+- handler = server_descr.app.make_handler()
+- server = await self.loop.create_server(
+- handler,
+- sock=server_sockets[server_name])
+- server_descr.handler = handler
+- server_descr.server = server
++ runner = web.AppRunner(server_descr.app)
++ await runner.setup()
++ site = web.SockSite(runner, server_sockets[server_name])
++ await site.start()
++ server_descr.runner = runner
+
+ self._logger.info("Started server '%s' at '%s'",
+ server_name, server_descr.url)
+
+ async def stop_servers(self):
+ for server_descr in self.servers.values():
+- server_descr.server.close()
+- await server_descr.handler.shutdown()
+- await server_descr.server.wait_closed()
+- await server_descr.app.cleanup()
++ runner = server_descr.runner
++ await runner.shutdown()
++ await runner.cleanup()
+
+ self.servers = {}
+
+diff --git a/tests/unit/test_cors_config.py b/tests/unit/test_cors_config.py
+index 5b8d8f3..817410e 100644
+--- a/tests/unit/test_cors_config.py
++++ b/tests/unit/test_cors_config.py
+@@ -58,11 +58,10 @@ def options_route(app):
+ "OPTIONS", "/options_path", _handler)
+
+
+-def test_add_options_route(cors, options_route):
++def test_add_options_route(app, cors, options_route):
+ """Test configuring OPTIONS route"""
+-
+ with pytest.raises(ValueError,
+- match="/options_path already has OPTIONS handler"):
++ match="already has OPTIONS handler"):
+ cors.add(options_route.resource)
+
+
+--
+2.25.1
+