[arch-commits] Commit in (5 files)

Chih-Hsuan Yen yan12125 at archlinux.org
Fri Jun 25 16:58:19 UTC 2021


    Date: Friday, June 25, 2021 @ 16:58:19
  Author: yan12125
Revision: 967448

python-pyhcl: new package, which will be used by upcoming buildbot [1]

[1] https://github.com/buildbot/buildbot/pull/6058

Added:
  python-hvac/
  python-hvac/repos/
  python-hvac/trunk/
  python-hvac/trunk/PKGBUILD
  python-hvac/trunk/flask.diff

------------+
 PKGBUILD   |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 flask.diff |   13 +++++++++++++
 2 files changed, 65 insertions(+)

Added: python-hvac/trunk/PKGBUILD
===================================================================
--- python-hvac/trunk/PKGBUILD	                        (rev 0)
+++ python-hvac/trunk/PKGBUILD	2021-06-25 16:58:19 UTC (rev 967448)
@@ -0,0 +1,52 @@
+# Maintainer: Chih-Hsuan Yen <yan12125 at archlinux.org>
+# Contributor: David Vilar Benet <archlinux at b0rken dot de>
+
+_pkgname=hvac
+pkgname=python-$_pkgname
+pkgver=0.10.14
+pkgrel=2
+pkgdesc='Python 2.7/3.X client for HashiCorp Vault'
+url='https://python-hvac.org/'
+license=(Apache)
+arch=(any)
+depends=(python python-requests python-six)
+makedepends=(python-setuptools)
+checkdepends=(python-pytest python-authlib python-flask python-flask-sqlalchemy python-mock
+              python-parameterized python-pyhcl python-requests-mock python-werkzeug python-jwcrypto
+              vault consul)
+optdepends=(
+  'python-pyhcl: for parsing returned data'
+)
+source=("https://github.com/$_pkgname/$_pkgname/archive/v$pkgver/$_pkgname-$pkgver.tar.gz"
+        'flask.diff')
+sha512sums=('3b3b5c64df5c57679a35e09cd61d29090c950dfaa11f64b4c3f8442a3ccf6512cc2d792f60e035815e4c4857813ba49612e0f52c5da3670bd692116a6bd28469'
+            'ce5b56ef800b8e6fbf9f8d8097558ec6e98fd48a140b29a5e81a290eebe37369669b529a3e16fd873768a2591d4192ca2c7f88acca5f71873d47f94d8dc45899')
+
+prepare() {
+  # /usr/bin/vault not working in clean chroots as it requires CAP_IPC_LOCK
+  # https://github.com/hashicorp/vault/issues/10048
+  mkdir -p vault-unprivileged
+  cp -v /usr/bin/vault vault-unprivileged/
+
+  cd $_pkgname-$pkgver
+  # hvac tests incorrect use Flask APIs, and an error is thrown sine Flask 2.0.1
+  # https://github.com/pallets/flask/commit/7c5261407dae61679c268b44c63d73909c3fe652
+  patch -Np1 -i ../flask.diff
+}
+
+build() {
+  cd $_pkgname-$pkgver
+  python setup.py build
+}
+
+check() {
+  cd $_pkgname-$pkgver
+  # test_ldap requires many unpackaged dependencies
+  PATH="$srcdir/vault-unprivileged:$PATH" pytest tests \
+    --ignore=tests/integration_tests/api/auth_methods/test_ldap.py
+}
+
+package() {
+  cd $_pkgname-$pkgver
+  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+}

Added: python-hvac/trunk/flask.diff
===================================================================
--- python-hvac/trunk/flask.diff	                        (rev 0)
+++ python-hvac/trunk/flask.diff	2021-06-25 16:58:19 UTC (rev 967448)
@@ -0,0 +1,13 @@
+diff --git a/tests/utils/mock_oauth_provider/routes.py b/tests/utils/mock_oauth_provider/routes.py
+index b1254ea..54f0956 100644
+--- a/tests/utils/mock_oauth_provider/routes.py
++++ b/tests/utils/mock_oauth_provider/routes.py
+@@ -13,7 +13,7 @@ from tests.utils.mock_oauth_provider.models import (OAuth2Client, User, db)
+ from tests.utils.mock_oauth_provider.oauth2 import (authorization, require_oauth)
+ 
+ logger = logging.getLogger(__name__)
+-bp = Blueprint(__name__, 'home')
++bp = Blueprint('home', __name__)
+ 
+ 
+ def current_user():




More information about the arch-commits mailing list