summaryrefslogtreecommitdiff
path: root/dev-python/wsgiintercept
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-python/wsgiintercept
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-python/wsgiintercept')
-rw-r--r--dev-python/wsgiintercept/Manifest3
-rw-r--r--dev-python/wsgiintercept/metadata.xml20
-rw-r--r--dev-python/wsgiintercept/wsgiintercept-1.3.1.ebuild60
3 files changed, 83 insertions, 0 deletions
diff --git a/dev-python/wsgiintercept/Manifest b/dev-python/wsgiintercept/Manifest
new file mode 100644
index 000000000000..8668ee3a5427
--- /dev/null
+++ b/dev-python/wsgiintercept/Manifest
@@ -0,0 +1,3 @@
+DIST wsgi_intercept-1.3.1.tar.gz 24596 BLAKE2B fd585991c5fc928c6e499e6ed35be2b1ea21e71b4dd18500e4d77bea40cc974950571431da30b2c5c0673c1f8d21957f9938e67a61a132731bfc0d8aec147935 SHA512 6b435246b20694437ec0c79b9675af3a24c43b77e3b1ca6b8ede473c2077259197ada5c4dcb9f197331975ed97e7d475792f9ab4a7da2aa9c657203c55662479
+EBUILD wsgiintercept-1.3.1.ebuild 1601 BLAKE2B 89a4db911daf0f79c6a9dc85451e893d7e146f52202e2b859bd34589aa1a764541690909f5ecbfde65689312ed19cf2e18f1f47abfb8e0fe15d5da5125d2be04 SHA512 cf33b62acee5a7dd3a3969d53be3a1a53964a898a7eccdbd2c85cf19720fe44950174e20d3fc07ce5ab982292d201f79f97a8491cf510661b1c11b08982f0ac7
+MISC metadata.xml 892 BLAKE2B 9172a2b13d71f443f574bd59462ec8a866bd079c8a5c06aab365bc7f726dc228f3c0a264bd063b02db0d0d3e67ae1a05e4018f3a8f82c66a7ad2c17157488c0b SHA512 776ed8e2f5df00109aae96f10c1ad5f678ac92c348b15d3597b8c48fd3961da19d0d397a7322c7f2c2b02fc7befa9db5cee8d4eb33b43c280c0076bcc1fa9ad9
diff --git a/dev-python/wsgiintercept/metadata.xml b/dev-python/wsgiintercept/metadata.xml
new file mode 100644
index 000000000000..74ef24e0a42c
--- /dev/null
+++ b/dev-python/wsgiintercept/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <longdescription>
+Testing a WSGI application normally involves starting a server at a local host
+and port, then pointing your test code to that address. Instead, this library
+lets you intercept calls to any specific host/port combination and redirect
+them into a WSGI application importable by your test program. Thus, you can
+avoid spawning multiple processes or threads to test your Web app.
+</longdescription>
+ <upstream>
+ <remote-id type="pypi">wsgi_intercept</remote-id>
+ <bugs-to>https://code.google.com/p/wsgi-intercept/issues/list</bugs-to>
+ <remote-id type="github">cdent/python3-wsgi-intercept</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/wsgiintercept/wsgiintercept-1.3.1.ebuild b/dev-python/wsgiintercept/wsgiintercept-1.3.1.ebuild
new file mode 100644
index 000000000000..df6d20d48954
--- /dev/null
+++ b/dev-python/wsgiintercept/wsgiintercept-1.3.1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy )
+
+inherit distutils-r1
+
+MY_PN="wsgi_intercept"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="WSGI application in place of a real URI for testing"
+HOMEPAGE="https://github.com/cdent/python3-wsgi-intercept"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+SLOT="0"
+LICENSE="MIT"
+KEYWORDS="amd64 ~arm64 x86 ~amd64-linux ~x86-linux"
+IUSE="doc test"
+RDEPEND=""
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]
+ test? (
+ dev-python/httplib2[${PYTHON_USEDEP}]
+ >=dev-python/pytest-2.4[${PYTHON_USEDEP}]
+ >=dev-python/requests-2.0.1[${PYTHON_USEDEP}]
+ >=dev-python/urllib3-1.11.0[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep 'dev-python/mechanize[${PYTHON_USEDEP}]' python2_7 pypy)
+ )"
+S="${WORKDIR}/${MY_P}"
+
+python_prepare_all() {
+ # .pyc files cause failure of tests
+ rm -rf test/__pycache__/ || die
+
+ # Req'd to avoid file collisions
+ sed -e s":find_packages():find_packages(exclude=['test']):" \
+ -i setup.py || die
+
+ # Disable tests connecting to the network; Bug #550710
+ sed -e 's:test_http_not_intercepted:_&:' \
+ -e 's:test_https_not_intercepted:_&:' \
+ -i test/{test_urllib.py,test_http_client.py,test_requests.py} || die
+ distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+ use doc && emake -C docs html
+}
+
+python_test() {
+ py.test || die "Tests failed under ${EPYTHON}"
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( docs/_build/html//. )
+ distutils-r1_python_install_all
+}