[arch-commits] Commit in httpbin/trunk (PKGBUILD httpbin-werkzeug-0.15.1.patch)
Felix Yan
felixonmars at archlinux.org
Thu Feb 13 09:10:30 UTC 2020
Date: Thursday, February 13, 2020 @ 09:10:30
Author: felixonmars
Revision: 569927
upgpkg: httpbin 0.7.0-4
- remove python2 sibling
- fix tests for new werkzeug
Added:
httpbin/trunk/httpbin-werkzeug-0.15.1.patch
Modified:
httpbin/trunk/PKGBUILD
-------------------------------+
PKGBUILD | 51 +++++++++++-----------------------------
httpbin-werkzeug-0.15.1.patch | 34 ++++++++++++++++++++++++++
2 files changed, 49 insertions(+), 36 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-02-13 09:10:27 UTC (rev 569926)
+++ PKGBUILD 2020-02-13 09:10:30 UTC (rev 569927)
@@ -1,47 +1,37 @@
# Maintainer: Felix Yan <felixonmars at archlinux.org>
-pkgbase=httpbin
-pkgname=(httpbin python2-httpbin)
+pkgname=httpbin
pkgver=0.7.0
-pkgrel=3
+pkgrel=4
pkgdesc="HTTP Request and Response Service"
arch=('any')
url="https://github.com/requests/httpbin"
license=('MIT')
-makedepends=('python-setuptools' 'python2-setuptools' 'python-flask' 'python2-flask'
- 'python-markupsafe' 'python2-markupsafe' 'python-itsdangerous' 'python2-itsdangerous'
- 'python-six' 'python2-six' 'python-decorator' 'python2-decorator' 'python-brotlipy'
- 'python2-brotlipy' 'python-raven' 'python2-raven' 'python-werkzeug'
- 'python2-werkzeug' 'python-gevent' 'python2-gevent' 'python-flasgger'
- 'python2-flasgger' 'python-blinker' 'python2-blinker')
-source=("$pkgbase-$pkgver.tar.gz::https://github.com/requests/httpbin/archive/v$pkgver.tar.gz")
-sha512sums=('faec48a0a2ac8800293b10281966a28195884ad2f69f0f28f1b8c8e1a7bfd8933ebbc9b541c80cdc19e1031a8ba9383afe8e372b9044436cb307dd1e8eddaae7')
+depends=('python-flask' 'python-markupsafe' 'python-itsdangerous' 'python-six' 'python-decorator'
+ 'python-brotli' 'python-raven' 'python-werkzeug' 'python-gevent' 'python-flasgger'
+ 'python-blinker')
+makedepends=('python-setuptools')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/requests/httpbin/archive/v$pkgver.tar.gz"
+ httpbin-werkzeug-0.15.1.patch)
+sha512sums=('faec48a0a2ac8800293b10281966a28195884ad2f69f0f28f1b8c8e1a7bfd8933ebbc9b541c80cdc19e1031a8ba9383afe8e372b9044436cb307dd1e8eddaae7'
+ '3c058ca5f685e281f7d60216de844e58727e7677766660df410ec57d8c985485cf611ec64eb71a234bdd49b4fdf66be6138d4bb7258d9e6d0346d6c6ee9f3cdf')
prepare() {
- cp -a httpbin-$pkgver{,-py2}
+ patch -d httpbin-$pkgver -p1 -i ../httpbin-werkzeug-0.15.1.patch
+ sed -i 's/brotlipy/Brotli/g' httpbin-$pkgver/setup.py
}
build() {
- cd "$srcdir"/httpbin-$pkgver
+ cd httpbin-$pkgver
LC_CTYPE=en_US.UTF-8 python setup.py build
-
- cd "$srcdir"/httpbin-$pkgver-py2
- python2 setup.py build
}
check() {
- cd "$srcdir"/httpbin-$pkgver
+ cd httpbin-$pkgver
python test_httpbin.py
-
- cd "$srcdir"/httpbin-$pkgver-py2
- python2 test_httpbin.py
}
-package_httpbin() {
- depends=('python-flask' 'python-markupsafe' 'python-itsdangerous' 'python-six' 'python-decorator'
- 'python-brotlipy' 'python-raven' 'python-werkzeug' 'python-gevent' 'python-flasgger'
- 'python-blinker')
-
+package() {
cd httpbin-$pkgver
LC_CTYPE=en_US.UTF-8 python setup.py install -O1 --root="$pkgdir"
@@ -48,15 +38,4 @@
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
-package_python2-httpbin() {
- depends=('python2-flask' 'python2-markupsafe' 'python2-itsdangerous' 'python2-six'
- 'python2-decorator' 'python2-brotlipy' 'python2-raven' 'python2-werkzeug'
- 'python2-gevent' 'python2-flasgger' 'python2-blinker')
-
- cd httpbin-$pkgver-py2
- python2 setup.py install -O1 --root="$pkgdir"
-
- install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-}
-
# vim:set ts=2 sw=2 et:
Added: httpbin-werkzeug-0.15.1.patch
===================================================================
--- httpbin-werkzeug-0.15.1.patch (rev 0)
+++ httpbin-werkzeug-0.15.1.patch 2020-02-13 09:10:30 UTC (rev 569927)
@@ -0,0 +1,34 @@
+From b6cb2b47a3813da5df8dbffada284b72d7fe099e Mon Sep 17 00:00:00 2001
+From: Simon Kowallik <github at simonkowallik.com>
+Date: Sat, 18 May 2019 13:10:08 +0200
+Subject: [PATCH 1/2] fix #554: update tests, Pipfile, Pipfile.lock for
+ werkzeug>=0.15.1
+
+- update test_httpbin.py to reflect new behaviour of werkzeug
+- require werkzeug>=0.15.1
+---
+ Pipfile | 2 +-
+ Pipfile.lock | 6 +++---
+ test_httpbin.py | 2 --
+ 3 files changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/test_httpbin.py b/test_httpbin.py
+index b7104ff..ea51ae8 100755
+--- a/test_httpbin.py
++++ b/test_httpbin.py
+@@ -148,7 +148,6 @@ def test_get(self):
+ 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')
+@@ -162,7 +161,6 @@ def test_anything(self):
+ 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'))
More information about the arch-commits
mailing list