summaryrefslogtreecommitdiff
path: root/dev-python/httpbin
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-12-15 18:09:03 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-12-15 18:09:03 +0000
commit7bc9c63c9da678a7e6fceb095d56c634afd22c56 (patch)
tree4a67d50a439e9af63947e5f8b6ba3719af98b6c9 /dev-python/httpbin
parentb284a3168fa91a038925d2ecf5e4791011ea5e7d (diff)
gentoo resync : 15.12.2019
Diffstat (limited to 'dev-python/httpbin')
-rw-r--r--dev-python/httpbin/Manifest4
-rw-r--r--dev-python/httpbin/files/httpbin-0.7.0-optional-raven.patch19
-rw-r--r--dev-python/httpbin/files/httpbin-0.7.0-test-werkzeug.patch19
-rw-r--r--dev-python/httpbin/httpbin-0.7.0.ebuild38
4 files changed, 80 insertions, 0 deletions
diff --git a/dev-python/httpbin/Manifest b/dev-python/httpbin/Manifest
index 5470ee2cdc5a..454056c12290 100644
--- a/dev-python/httpbin/Manifest
+++ b/dev-python/httpbin/Manifest
@@ -1,3 +1,7 @@
+AUX httpbin-0.7.0-optional-raven.patch 841 BLAKE2B bdf8cd94706b08d6706349ad471212fbda7f78e7125378073e4db43af352b26778706b2c61ca51f6c1c44aae4fd250432793e0ffef463102324ed39069da20bd SHA512 757bbe80463b332571e9d6e2e3266d2db3df519a180a7d3840b6f4813c2373382519e322547feb522c59ec3893d4721e42463d8231b4f5904725b9547af407bd
+AUX httpbin-0.7.0-test-werkzeug.patch 1108 BLAKE2B a7118afed382eeedcfb3e8ff9a31b31fb80c01cf97f19948f9d208d77289f829d3ef24f4cbdde74cc87d2d640b61a51994292fcdf5058f94b8768fd4c37a3cc1 SHA512 3556b921a6daed3dc561d78912b41ca9a3cea1274384f849bba1d7cd7e7014798ce5c9e93491351ca5225e26762be03c73cd0d09c60c90b8a55ff6e6ce0bf81f
DIST httpbin-0.4.1.tar.gz 88101 BLAKE2B 3df333ba92d50e065a598b2dc51ff3355eb94eb4b3a3094ba79cbe95fc11424e05f187e434ac299023dfbfd790b32db070a37e08a962ac19d803de4405603bb8 SHA512 feb519ee909c5115971f4bfd488ec0f9e987cd473464721f4e343e09b9d8fc592cf48b50ff3a2960bb67310521d865091cd766ed351ebfaa2dc8193115e9f052
+DIST httpbin-0.7.0.tar.gz 92613 BLAKE2B 59252df1d4d0ef853ec65263b472d3ba6c597336d844f9b457f2d0a009048d4222f715a7f6fb120aca00fa641d1687e302036dc151bd2fd67ba98cf5fc47a63a SHA512 82e80058b58943637e9f8191764cea79bf7a6e40f36069f9b5d3f908585dbef20a03ef070d1f865d350920b6e874a93a48a544b05c14ff4911038ec2c20f6f63
EBUILD httpbin-0.4.1.ebuild 895 BLAKE2B 4c5c5ec61394a4f13f81d1f240fb8967469d863c734c36ed1bd02370c3d5e533b885d8a7aaa64ae19ead1afbc6fcb67d9b0ac42b8fed3f0660ab4dde4e41b9c0 SHA512 49a277badcbae212f365d58afdf744b03f6c32b42837a93633b75f4564464e14872817f0ff0c104f9b5accb33563df4b82b29595f6efe3da317966269ebb79b3
+EBUILD httpbin-0.7.0.ebuild 1093 BLAKE2B 2758d9b884ab296fac377be24db8ca5479f7fe03293d9e35a8dbd2814b18261d9499e3f362ab20d09b7c424c560744c901fefe5a015848138c4b6dca20fa9d99 SHA512 24897c347df5c8884867caa654e62485c273f5eddb791f91b0e1c91a1b9f84de05f8274d2eaf8d93e3f30e02dfe86528cbbb9dc0cd24a283b1a67be5fd0e25cb
MISC metadata.xml 500 BLAKE2B 1270abbd84e19a72d75a2955858c49c6b33a8c92da7f86fb7853fde55968a840d941fe9f7cd1ec2718e8cbcfede6166c412aac7fc40e483043330935720dd898 SHA512 014a5e115d2cd225618e78ddf226dfe4f8772815efc3e9ecf49883701127335d9cba5e216daaba3f15de2944074c0041e5fd6eaf26772f0892da891570f841e1
diff --git a/dev-python/httpbin/files/httpbin-0.7.0-optional-raven.patch b/dev-python/httpbin/files/httpbin-0.7.0-optional-raven.patch
new file mode 100644
index 000000000000..8602ed7641be
--- /dev/null
+++ b/dev-python/httpbin/files/httpbin-0.7.0-optional-raven.patch
@@ -0,0 +1,19 @@
+diff -dupr a/httpbin/core.py b/httpbin/core.py
+--- a/httpbin/core.py 2018-05-08 13:41:03.000000000 +0200
++++ b/httpbin/core.py 2019-11-22 15:07:27.516500217 +0100
+@@ -21,7 +21,6 @@ from werkzeug.datastructures import WWWA
+ from werkzeug.http import http_date
+ from werkzeug.wrappers import BaseResponse
+ from werkzeug.http import parse_authorization_header
+-from raven.contrib.flask import Sentry
+
+ from . import filters
+ from .helpers import get_headers, status_code, get_dict, get_request_range, check_basic_auth, check_digest_auth, \
+@@ -58,6 +57,7 @@ app.debug = bool(os.environ.get('DEBUG')
+
+ # Send app errors to Sentry.
+ if 'SENTRY_DSN' in os.environ:
++ from raven.contrib.flask import Sentry
+ sentry = Sentry(app, dsn=os.environ['SENTRY_DSN'])
+
+ # Set up Bugsnag exception tracking, if desired. To use Bugsnag, install the
diff --git a/dev-python/httpbin/files/httpbin-0.7.0-test-werkzeug.patch b/dev-python/httpbin/files/httpbin-0.7.0-test-werkzeug.patch
new file mode 100644
index 000000000000..956a2f5235ca
--- /dev/null
+++ b/dev-python/httpbin/files/httpbin-0.7.0-test-werkzeug.patch
@@ -0,0 +1,19 @@
+diff -dupr a/test_httpbin.py b/test_httpbin.py
+--- a/test_httpbin.py 2019-11-22 15:06:56.199774070 +0100
++++ b/test_httpbin.py 2019-11-22 15:18:58.010069445 +0100
+@@ -144,7 +144,6 @@ class HttpbinTestCase(unittest.TestCase)
+ data = json.loads(response.data.decode('utf-8'))
+ self.assertEqual(data['args'], {})
+ self.assertEqual(data['headers']['Host'], 'localhost')
+- self.assertEqual(data['headers']['Content-Length'], '0')
+ self.assertEqual(data['headers']['User-Agent'], 'test')
+ # self.assertEqual(data['origin'], None)
+ self.assertEqual(data['url'], 'http://localhost/get')
+@@ -158,7 +157,6 @@ class HttpbinTestCase(unittest.TestCase)
+ data = json.loads(response.data.decode('utf-8'))
+ self.assertEqual(data['args'], {})
+ self.assertEqual(data['headers']['Host'], 'localhost')
+- self.assertEqual(data['headers']['Content-Length'], '0')
+ self.assertEqual(data['url'], 'http://localhost/anything/foo/bar')
+ self.assertEqual(data['method'], 'GET')
+ self.assertTrue(response.data.endswith(b'\n'))
diff --git a/dev-python/httpbin/httpbin-0.7.0.ebuild b/dev-python/httpbin/httpbin-0.7.0.ebuild
new file mode 100644
index 000000000000..949dc757b7a9
--- /dev/null
+++ b/dev-python/httpbin/httpbin-0.7.0.ebuild
@@ -0,0 +1,38 @@
+# 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} pypy pypy3 )
+
+inherit distutils-r1
+
+DESCRIPTION="HTTP Request and Response Service"
+HOMEPAGE="https://github.com/postmanlabs/httpbin
+ https://pypi.org/project/httpbin/"
+SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="
+ dev-python/brotlipy[${PYTHON_USEDEP}]
+ dev-python/decorator[${PYTHON_USEDEP}]
+ dev-python/flask[${PYTHON_USEDEP}]
+ dev-python/itsdangerous[${PYTHON_USEDEP}]
+ dev-python/markupsafe[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]
+ >=dev-python/werkzeug-0.14.1[${PYTHON_USEDEP}]"
+BDEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]"
+
+PATCHES=(
+ # do not import raven if it's not going to be used
+ # (upstream removed it completely in git anyway)
+ "${FILESDIR}"/httpbin-0.7.0-optional-raven.patch
+ # fix tests with new versions of werkzeug
+ "${FILESDIR}"/httpbin-0.7.0-test-werkzeug.patch
+)
+
+distutils_enable_tests unittest