summaryrefslogtreecommitdiff
path: root/dev-python/httpbin
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-04-16 13:07:24 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-04-16 13:07:24 +0100
commit0c100b7dd2b30e75b799d806df4ef899fd98e1ea (patch)
tree464c922e949c7e4d5d891fb2cdda5daee5612537 /dev-python/httpbin
parente68d405c5d712af4387159df07e226217bdda049 (diff)
gentoo resync : 16.04.2022
Diffstat (limited to 'dev-python/httpbin')
-rw-r--r--dev-python/httpbin/Manifest4
-rw-r--r--dev-python/httpbin/files/httpbin-0.7.0-werkzeug-2.1.patch32
-rw-r--r--dev-python/httpbin/httpbin-0.7.0-r4.ebuild9
-rw-r--r--dev-python/httpbin/httpbin-0.7.0-r5.ebuild56
4 files changed, 97 insertions, 4 deletions
diff --git a/dev-python/httpbin/Manifest b/dev-python/httpbin/Manifest
index 300ccafdb673..986e3193548f 100644
--- a/dev-python/httpbin/Manifest
+++ b/dev-python/httpbin/Manifest
@@ -1,6 +1,8 @@
AUX httpbin-0.7.0-brotlicffi.patch 1362 BLAKE2B 524973fe131181c6601ea7b973c25e55a3b195988ca56ba46debb80f44f6111c1bfe734abe659bee11caef36c322366d2c78b3a5798da54ce8bcc3ffaf20f313 SHA512 d0eda00e90904b090a43fb3504d0bbb4284837ecce1865ab87151e5661f0daa84dff81bfeb816181ee0e9f963114ff0fc46cec59b9b5de86ba322671abee4e56
AUX httpbin-0.7.0-optional-raven.patch 1218 BLAKE2B 010a13db882711af3cd74175b87371d0c9c6e279168653836ce4a445357f4ca3fbd77fc262a57de5cbfccbc4da514e1e89253595b4fdab03553ed9adffddbc57 SHA512 2feb379c4b888560f825f5fce0130999705bfe83cff190da1651ffb9842243036ecb28d1f54cc92d7a855f73b45f0cf5164df75732f4ac2c9035b583941a9560
AUX httpbin-0.7.0-test-werkzeug.patch 1108 BLAKE2B a7118afed382eeedcfb3e8ff9a31b31fb80c01cf97f19948f9d208d77289f829d3ef24f4cbdde74cc87d2d640b61a51994292fcdf5058f94b8768fd4c37a3cc1 SHA512 3556b921a6daed3dc561d78912b41ca9a3cea1274384f849bba1d7cd7e7014798ce5c9e93491351ca5225e26762be03c73cd0d09c60c90b8a55ff6e6ce0bf81f
+AUX httpbin-0.7.0-werkzeug-2.1.patch 1158 BLAKE2B 7343f4dbe9886fd54fc8187bc48ed8bd016c03057c4e5de81a46c2389b8d9fdd381f687855dc8ded1d8133a47fb8f09f4ec6c8eae739ca1c157945af97a633c5 SHA512 3d9ed7ab76dc0a33d69cf973e16be7358daa0af0a48d5ac24e0ad6ea8d73a68a796b4c8526ad764c0ed09997448f744f205b909261c32405ff166b359be1fb8b
DIST httpbin-0.7.0.tar.gz 92613 BLAKE2B 59252df1d4d0ef853ec65263b472d3ba6c597336d844f9b457f2d0a009048d4222f715a7f6fb120aca00fa641d1687e302036dc151bd2fd67ba98cf5fc47a63a SHA512 82e80058b58943637e9f8191764cea79bf7a6e40f36069f9b5d3f908585dbef20a03ef070d1f865d350920b6e874a93a48a544b05c14ff4911038ec2c20f6f63
-EBUILD httpbin-0.7.0-r4.ebuild 1479 BLAKE2B 339d4a06a326d7f39384bc1f64dc2b5eec411e73936f7ef010b2f679e50e260bdc01075365c8ef44faffc5047de55622448f934fe5209fe36d74364d021b207f SHA512 3ee535b21153c5dee80734a27a86234a8ac031b31f786505787961da54dbe43bf749d32f232140f865823ebac6e10d40fdc0949d53cafd6f40903995a577c6ae
+EBUILD httpbin-0.7.0-r4.ebuild 1480 BLAKE2B 08270bfa071fe42db49874161cd8f2de4f5ae1e834dad863a96329830b73e4315dfa5c7e7401da1a7bef7c75653a0dadf701ca2a664028efc18e96f26adc896c SHA512 d7d43a6981037e8ae988a3a956f7d5f8bcd65142e4ae4e51cee861df03e093864b941cbcdbbfd449c1a702aa7fdd2dc3dc919e2def821d6f7daaaed6803020f0
+EBUILD httpbin-0.7.0-r5.ebuild 1554 BLAKE2B ba6bbb2846a7052952ebd568853b4b2700454a20f4b2898e25ca251e79b646a22b075d70c7266433c7561b3fba11cf1c5889464b4d4c7e5633b3acd9f3889cb9 SHA512 6b0201a9f2f375a0de16f6fff6f80a9a388f35c096a9ee3fab07badc0cb5e86e8203b22f2b40913ad7965a3ec41e219628cc3fcc71e3bf09e2588fb9a97390ca
MISC metadata.xml 394 BLAKE2B 73c2d6f27f957cfeaddc8c69cc0d7a7bf68514f1d840a982de1eaf9a62be8cf066d7b77b4b5f69fc42806979934e26d497ddf9d66d8f18dcaa32168fd83f7a0e SHA512 70c529e2d1b716a1997773f999902547010bd9406cfde38408a5941a70400e13c949f1a8fb20a53e0f0da4da91742cc259910e97cce8917dc029f3cb84d72bdd
diff --git a/dev-python/httpbin/files/httpbin-0.7.0-werkzeug-2.1.patch b/dev-python/httpbin/files/httpbin-0.7.0-werkzeug-2.1.patch
new file mode 100644
index 000000000000..cf7871268d99
--- /dev/null
+++ b/dev-python/httpbin/files/httpbin-0.7.0-werkzeug-2.1.patch
@@ -0,0 +1,32 @@
+From 5cc81ce87a3c447a127e4a1a707faf9f3b1c9b6b Mon Sep 17 00:00:00 2001
+From: Maximino BOGADO <bogamax2@hotmail.fr>
+Date: Wed, 30 Mar 2022 16:26:31 +0200
+Subject: [PATCH] Replace BaseResponse to Response class (new werkzeug version
+ 2.1.0)
+
+---
+ httpbin/core.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/httpbin/core.py b/httpbin/core.py
+index 305c9882..2bad408e 100644
+--- a/httpbin/core.py
++++ b/httpbin/core.py
+@@ -29,7 +29,7 @@
+ from six.moves import range as xrange
+ from werkzeug.datastructures import WWWAuthenticate, MultiDict
+ from werkzeug.http import http_date
+-from werkzeug.wrappers import BaseResponse
++from werkzeug.wrappers import Response
+ from werkzeug.http import parse_authorization_header
+ from flasgger import Swagger, NO_SANITIZER
+
+@@ -77,7 +77,7 @@ def jsonify(*args, **kwargs):
+
+
+ # Prevent WSGI from correcting the casing of the Location header
+-BaseResponse.autocorrect_location_header = False
++Response.autocorrect_location_header = False
+
+ # Find the correct template folder when running from a different location
+ tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "templates")
diff --git a/dev-python/httpbin/httpbin-0.7.0-r4.ebuild b/dev-python/httpbin/httpbin-0.7.0-r4.ebuild
index df999b5429a0..7750896348d1 100644
--- a/dev-python/httpbin/httpbin-0.7.0-r4.ebuild
+++ b/dev-python/httpbin/httpbin-0.7.0-r4.ebuild
@@ -9,8 +9,10 @@ PYTHON_COMPAT=( python3_{8..10} pypy3 )
inherit distutils-r1
DESCRIPTION="HTTP Request and Response Service"
-HOMEPAGE="https://github.com/postmanlabs/httpbin
- https://pypi.org/project/httpbin/"
+HOMEPAGE="
+ https://github.com/postmanlabs/httpbin/
+ https://pypi.org/project/httpbin/
+"
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
@@ -24,7 +26,8 @@ RDEPEND="
dev-python/itsdangerous[${PYTHON_USEDEP}]
dev-python/markupsafe[${PYTHON_USEDEP}]
dev-python/six[${PYTHON_USEDEP}]
- >=dev-python/werkzeug-0.14.1[${PYTHON_USEDEP}]"
+ <dev-python/werkzeug-2.1[${PYTHON_USEDEP}]
+"
PATCHES=(
# do not import raven if it's not going to be used
diff --git a/dev-python/httpbin/httpbin-0.7.0-r5.ebuild b/dev-python/httpbin/httpbin-0.7.0-r5.ebuild
new file mode 100644
index 000000000000..5eb386243953
--- /dev/null
+++ b/dev-python/httpbin/httpbin-0.7.0-r5.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{8..10} 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 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+
+RDEPEND="
+ dev-python/brotlicffi[${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-2.0[${PYTHON_USEDEP}]
+"
+
+PATCHES=(
+ # do not import raven if it's not going to be used
+ # (upstream removed it completely in git anyway)
+ "${FILESDIR}"/${P}-optional-raven.patch
+ # fix tests with new versions of werkzeug
+ "${FILESDIR}"/${P}-test-werkzeug.patch
+ # use brotlicffi instead of brotlipy
+ "${FILESDIR}"/${P}-brotlicffi.patch
+ # fix compat with werkzeug 2.1
+ # https://github.com/postmanlabs/httpbin/pull/674
+ "${FILESDIR}"/${P}-werkzeug-2.1.patch
+)
+
+distutils_enable_tests unittest
+
+src_prepare() {
+ # a new version of flask or whatever converts relative redirects
+ # to absolute; this package is dead anyway, so just skip
+ # the relevant tests
+ sed -e 's:test_redirect:_&:' \
+ -e 's:test_relative:_&:' \
+ -i test_httpbin.py || die
+
+ distutils-r1_src_prepare
+}