summaryrefslogtreecommitdiff
path: root/dev-python/aiohttp-cors
diff options
context:
space:
mode:
authorPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
committerPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
commitecdac123787b96ce6649f0f91da12ea6458cc2b1 (patch)
treeb89c74d9e6fe6e8aebc4c77bcbeb4ab73214127d /dev-python/aiohttp-cors
parent1be72aa41cf41dedadeecf59dca9f01de6381f5e (diff)
downloadbaldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.gz
baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.xz
baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.zip
Updating liguros repo
Diffstat (limited to 'dev-python/aiohttp-cors')
-rw-r--r--dev-python/aiohttp-cors/Manifest1
-rw-r--r--dev-python/aiohttp-cors/aiohttp-cors-0.7.0-r1.ebuild37
-rw-r--r--dev-python/aiohttp-cors/aiohttp-cors-0.7.0.ebuild35
-rw-r--r--dev-python/aiohttp-cors/files/aiohttp-cors-0.7.0-py3_7.patch23
-rw-r--r--dev-python/aiohttp-cors/files/aiohttp-cors-0.7.0-tests.patch66
-rw-r--r--dev-python/aiohttp-cors/metadata.xml16
6 files changed, 178 insertions, 0 deletions
diff --git a/dev-python/aiohttp-cors/Manifest b/dev-python/aiohttp-cors/Manifest
new file mode 100644
index 000000000000..4912de93657a
--- /dev/null
+++ b/dev-python/aiohttp-cors/Manifest
@@ -0,0 +1 @@
+DIST aiohttp-cors-0.7.0.tar.gz 39728 BLAKE2B 747499856272f551cf8e2e0911ff7cbb2c7cb8a1f3159327dd8f0d40cabbbd9713a1a9e30ef9c99f3f9642567c99025e049db837c89f907d6698a27005ac2632 SHA512 72e0b365b952c08a02c1123d7672cfea01063e2ff01743a71e10f804d22178edc0f1c6b7f87b7ed484ca7c24e89a32de90d0d279f2f5c060427319182f9bdd3b
diff --git a/dev-python/aiohttp-cors/aiohttp-cors-0.7.0-r1.ebuild b/dev-python/aiohttp-cors/aiohttp-cors-0.7.0-r1.ebuild
new file mode 100644
index 000000000000..eded3a043888
--- /dev/null
+++ b/dev-python/aiohttp-cors/aiohttp-cors-0.7.0-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+
+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"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND=">=dev-python/aiohttp-1.1.1[${PYTHON_USEDEP}]"
+BDEPEND="
+ test? (
+ dev-python/pytest-aiohttp[${PYTHON_USEDEP}]
+ dev-python/selenium[${PYTHON_USEDEP}]
+ )"
+
+distutils_enable_tests pytest
+
+# https://github.com/aio-libs/aiohttp-cors/pull/278
+PATCHES=(
+ "${FILESDIR}/${P}-tests.patch"
+ "${FILESDIR}/${P}-py3_7.patch"
+)
+
+src_prepare() {
+ sed -i -e '/^addopts=/d' setup.cfg || die
+ echo " ignore::DeprecationWarning" >> pytest.ini
+ distutils-r1_src_prepare
+}
diff --git a/dev-python/aiohttp-cors/aiohttp-cors-0.7.0.ebuild b/dev-python/aiohttp-cors/aiohttp-cors-0.7.0.ebuild
new file mode 100644
index 000000000000..bcc29302a0a0
--- /dev/null
+++ b/dev-python/aiohttp-cors/aiohttp-cors-0.7.0.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_6 )
+
+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"
+
+RDEPEND=">=dev-python/aiohttp-1.1.1[${PYTHON_USEDEP}]"
+BDEPEND="
+ test? (
+ dev-python/pytest-aiohttp[${PYTHON_USEDEP}]
+ dev-python/selenium[${PYTHON_USEDEP}]
+ )"
+
+distutils_enable_tests pytest
+
+PATCHES=(
+ "${FILESDIR}"/aiohttp-cors-0.7.0-tests.patch
+)
+
+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-py3_7.patch b/dev-python/aiohttp-cors/files/aiohttp-cors-0.7.0-py3_7.patch
new file mode 100644
index 000000000000..9a4610824099
--- /dev/null
+++ b/dev-python/aiohttp-cors/files/aiohttp-cors-0.7.0-py3_7.patch
@@ -0,0 +1,23 @@
+From e64b95848f3253157d831f4934841fceeaf9b2e3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
+Date: Thu, 14 Nov 2019 12:54:47 +0100
+Subject: [PATCH] Test instance type by isinstance, not issubclass
+
+https://github.com/aio-libs/aiohttp-cors/pull/278
+Fixes https://github.com/aio-libs/aiohttp-cors/issues/277
+---
+ tests/unit/test_cors_config.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/unit/test_cors_config.py b/tests/unit/test_cors_config.py
+index 817410e..d494e20 100644
+--- a/tests/unit/test_cors_config.py
++++ b/tests/unit/test_cors_config.py
+@@ -103,7 +103,7 @@ def test_static_resource(app, cors):
+ "/file", "/", name="dynamic_named_route")
+ assert len(app.router.keys()) == 1
+ for resource in list(app.router.resources()):
+- if issubclass(resource, web.StaticResource):
++ if isinstance(resource, web.StaticResource):
+ cors.add(resource)
+ assert len(app.router.keys()) == 1
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
+
diff --git a/dev-python/aiohttp-cors/metadata.xml b/dev-python/aiohttp-cors/metadata.xml
new file mode 100644
index 000000000000..3f1bbc66a6cf
--- /dev/null
+++ b/dev-python/aiohttp-cors/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>onigino@protonmail.com</email>
+ <name>Gino McCarty</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">aio-libs/aiohttp-cors</remote-id>
+ </upstream>
+ <origin>gentoo-staging</origin>
+</pkgmetadata>