diff --git a/dev-python/wsgiproxy2/Manifest b/dev-python/wsgiproxy2/Manifest index 3aa79290d2e5a..2274a532485de 100644 --- a/dev-python/wsgiproxy2/Manifest +++ b/dev-python/wsgiproxy2/Manifest @@ -1,2 +1,3 @@ DIST WSGIProxy2-0.4.2.zip 18817 BLAKE2B 90334926b726024c1a16b066d11cfe579ad80515861811766753aa772fa97e521466bce0a08c028a965e51ec40b977feb1f4b59aa6c023ca6a431deb63668ed5 SHA512 3dd750263485ceb644373d8ea9692c9a46126a1ed7cd640feba7d42b0fe618e290dcae2f76dc83be77de34211ac473f5a1496a8309e3fcc64982e9642af786fb DIST WSGIProxy2-0.4.4.tar.gz 16475 BLAKE2B 8cc91e8364204a03fb8f80abb926e69112c2224b595c695d25e2fa54553fe9c82e3420f68b58f266d04450dd49a6dbf9257c190da8645dfeee976ae101fc708b SHA512 6ae9fca65fe80f52924f42b26b447631e8c278f517ababc23d26e5f8598d6d9b7975197ec74faf64f2e051824366ac14c5db5727a014a187c70a1b4604105b42 +DIST WSGIProxy2-0.4.6.tar.gz 16481 BLAKE2B c33dc34d430da795e8144e06e1d6f100cce7d0155295c2d3038567a048647a4f008dbc0156fd4234ce069b3f4ec01af0e42b174dd68c92c9cb3ff4e13be83f8a SHA512 c60d794c0c8b383bf1857ec325d6d0b4fce9c4aec4a06cbf9d7549b609633e491e137342b7bbaf4eec12462eabba63096328c8517b0685e241d1baecd5827cad diff --git a/dev-python/wsgiproxy2/files/wsgiproxy2-0.4.6-tests.patch b/dev-python/wsgiproxy2/files/wsgiproxy2-0.4.6-tests.patch new file mode 100644 index 0000000000000..77515b85b0272 --- /dev/null +++ b/dev-python/wsgiproxy2/files/wsgiproxy2-0.4.6-tests.patch @@ -0,0 +1,19 @@ +diff --git a/wsgiproxy/test_wsgiproxy.py b/wsgiproxy/test_wsgiproxy.py +index 39355d9..7806d3b 100644 +--- a/wsgiproxy/test_wsgiproxy.py ++++ b/wsgiproxy/test_wsgiproxy.py +@@ -1,4 +1,6 @@ + # -*- coding: utf-8 -*- ++import sys ++import platform + import unittest + from wsgiproxy import proxies + from webtest import TestApp +@@ -86,6 +88,7 @@ class TestHttplib(unittest.TestCase): + headers=[('Transfer-Encoding', 'chunked')]) + resp.mustcontain(no='chunked') + ++ @unittest.skipIf(sys.hexversion < 0x3000000 and 'pypy' not in platform.python_implementation().lower(), "broken on cpython2") + def test_quoted_utf8_url(self): + path = '/targets/NR2F1%C3%82-human/' + resp = self.app.get(path) diff --git a/dev-python/wsgiproxy2/wsgiproxy2-0.4.6.ebuild b/dev-python/wsgiproxy2/wsgiproxy2-0.4.6.ebuild new file mode 100644 index 0000000000000..257f448dd31d4 --- /dev/null +++ b/dev-python/wsgiproxy2/wsgiproxy2-0.4.6.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python2_7 python3_{5,6,7,8} pypy{,3} ) + +inherit distutils-r1 + +MY_PN="WSGIProxy2" + +DESCRIPTION="HTTP proxying tools for WSGI apps" +HOMEPAGE="https://pypi.org/project/WSGIProxy2/" +SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~s390 ~sh ~sparc ~x86" + +RDEPEND=" + dev-python/requests[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] + dev-python/urllib3[${PYTHON_USEDEP}] + dev-python/webob[${PYTHON_USEDEP}] +" +BDEPEND="${RDEPEND} + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( + >=dev-python/webtest-2.0.17[${PYTHON_USEDEP}] + dev-python/socketpool[${PYTHON_USEDEP}] + $(python_gen_cond_dep 'dev-python/restkit[${PYTHON_USEDEP}]' -2) + )" +# Tests needing restkit are skipped under py3 +# Testing also revealed the suite needs latest webtest + +S="${WORKDIR}/${MY_PN}-${PV}" + +PATCHES=( + "${FILESDIR}/wsgiproxy2-0.4.6-tests.patch" +) + +distutils_enable_sphinx docs +distutils_enable_tests nose + +python_prepare_all() { + sed -i '/with-coverage/ d' setup.cfg || die + + distutils-r1_python_prepare_all +}