[arch-commits] Commit in python-google-auth/repos (3 files)

Felix Yan felixonmars at archlinux.org
Fri Jan 3 16:31:47 UTC 2020


    Date: Friday, January 3, 2020 @ 16:31:45
  Author: felixonmars
Revision: 547641

archrelease: copy trunk to community-testing-any

Added:
  python-google-auth/repos/community-testing-any/
  python-google-auth/repos/community-testing-any/PKGBUILD
    (from rev 547640, python-google-auth/trunk/PKGBUILD)
  python-google-auth/repos/community-testing-any/pytest5.patch
    (from rev 547640, python-google-auth/trunk/pytest5.patch)

---------------+
 PKGBUILD      |   60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 pytest5.patch |   18 ++++++++++++++++
 2 files changed, 78 insertions(+)

Copied: python-google-auth/repos/community-testing-any/PKGBUILD (from rev 547640, python-google-auth/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD	                        (rev 0)
+++ community-testing-any/PKGBUILD	2020-01-03 16:31:45 UTC (rev 547641)
@@ -0,0 +1,60 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-google-auth
+pkgname=(python-google-auth python2-google-auth)
+pkgver=1.8.0
+pkgrel=1
+pkgdesc="Google Authentication Library"
+url="https://github.com/GoogleCloudPlatform/google-auth-library-python"
+license=('Apache')
+arch=('any')
+makedepends=('ca-certificates' 'python-setuptools' 'python2-setuptools' 'python-pyasn1-modules'
+             'python2-pyasn1-modules' 'python-rsa' 'python2-rsa' 'python-six' 'python2-six'
+             'python-cachetools' 'python2-cachetools')
+checkdepends=('python-pytest-runner' 'python2-pytest-runner' 'python-mock' 'python2-mock'
+              'python-requests' 'python2-requests' 'python-flask' 'python2-flask'
+              'python-oauth2client' 'python2-oauth2client' 'python-pytest-localserver'
+              'python2-pytest-localserver' 'python-cryptography' 'python2-cryptography'
+              'python-freezegun' 'python2-freezegun')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/GoogleCloudPlatform/google-auth-library-python/archive/v$pkgver.tar.gz")
+sha512sums=('563f63531fa2602f8428fab389833e212d21c2f7876bdeb6bbf86d4f398dce3f85b8af4ae7fab21bfa47fe68e7dca207fc1a1c89d731c10df0cff5f92670133c')
+
+prepare() {
+  # Use system cert
+  sed -i -e 's|certifi.where()|"/etc/ssl/certs/ca-certificates.crt"|' \
+         -e 's|if certifi is not None:|if True:|' \
+         google-auth-library-python-$pkgver/google/auth/transport/urllib3.py
+  cp -a google-auth-library-python-$pkgver{,-py2}
+}
+
+build() {
+  cd "$srcdir"/google-auth-library-python-$pkgver
+  python setup.py build
+
+  cd "$srcdir"/google-auth-library-python-$pkgver-py2
+  python2 setup.py build
+}
+
+check() {
+  # Skip the without_certifi tests because we always have the system ca bundle
+
+  cd "$srcdir"/google-auth-library-python-$pkgver
+  python setup.py pytest --addopts "tests -k 'not test__make_default_http_without_certifi'"
+
+  cd "$srcdir"/google-auth-library-python-$pkgver-py2
+  python2 setup.py pytest --addopts "tests -k 'not test__make_default_http_without_certifi'"
+}
+
+package_python-google-auth() {
+  depends=('ca-certificates' 'python-pyasn1-modules' 'python-rsa' 'python-six' 'python-cachetools')
+
+  cd google-auth-library-python-$pkgver
+  python setup.py install --root="$pkgdir" --optimize=1
+}
+
+package_python2-google-auth() {
+  depends=('ca-certificates' 'python2-pyasn1-modules' 'python2-rsa' 'python2-six' 'python2-cachetools')
+
+  cd google-auth-library-python-$pkgver-py2
+  python2 setup.py install --root="$pkgdir" --optimize=1
+}

Copied: python-google-auth/repos/community-testing-any/pytest5.patch (from rev 547640, python-google-auth/trunk/pytest5.patch)
===================================================================
--- community-testing-any/pytest5.patch	                        (rev 0)
+++ community-testing-any/pytest5.patch	2020-01-03 16:31:45 UTC (rev 547641)
@@ -0,0 +1,18 @@
+From 938e5d933aee963a6b28d6cf9e34e0634c8c4a29 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <tomas.chvatal at gmail.com>
+Date: Fri, 26 Jul 2019 01:20:41 +0200
+Subject: [PATCH] Use new pytest api to keep building with pytest 5 (#353)
+
+diff --git a/tests/test__default.py b/tests/test__default.py
+index 3fb0fa1..d143479 100644
+--- a/tests/test__default.py
++++ b/tests/test__default.py
+@@ -92,7 +92,7 @@ def test__load_credentials_from_file_authorized_user_bad_format(tmpdir):
+ 
+ 
+ def test__load_credentials_from_file_authorized_user_cloud_sdk():
+-    with pytest.warns(UserWarning, matches='Cloud SDK'):
++    with pytest.warns(UserWarning, match='Cloud SDK'):
+         credentials, project_id = _default._load_credentials_from_file(
+             AUTHORIZED_USER_CLOUD_SDK_FILE)
+     assert isinstance(credentials, google.oauth2.credentials.Credentials)



More information about the arch-commits mailing list