[arch-commits] Commit in python-google-auth/repos (2 files)
Felix Yan
felixonmars at archlinux.org
Fri Nov 9 21:22:00 UTC 2018
Date: Friday, November 9, 2018 @ 21:21:59
Author: felixonmars
Revision: 404610
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 404609, python-google-auth/trunk/PKGBUILD)
----------+
PKGBUILD | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
Copied: python-google-auth/repos/community-testing-any/PKGBUILD (from rev 404609, python-google-auth/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD (rev 0)
+++ community-testing-any/PKGBUILD 2018-11-09 21:21:59 UTC (rev 404610)
@@ -0,0 +1,59 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-google-auth
+pkgname=(python-google-auth python2-google-auth)
+pkgver=1.6.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')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/GoogleCloudPlatform/google-auth-library-python/archive/v$pkgver.tar.gz")
+sha512sums=('38657a6c347cf1dd3f99cd0c04dbb3aa0e0c029a7b35cb18787590f4a4ff4a598057b909aff8afa48837699f47f1777c922b053354b1078eac9eb173b441987c')
+
+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
+}
More information about the arch-commits
mailing list