aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-google-api-python-client
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-08-29 00:02:11 -0300
committerNatanael Copa <ncopa@alpinelinux.org>2019-09-03 15:29:28 +0000
commitbfcd592c17d22b0b8b71f1c642042422880876ec (patch)
tree3277626b52e9f8dd2637b369751fe30ef33e15ef /community/py3-google-api-python-client
parentf350b2f35858e237747aeb909e76d35539d4342d (diff)
downloadaports-bfcd592c17d22b0b8b71f1c642042422880876ec.tar.bz2
aports-bfcd592c17d22b0b8b71f1c642042422880876ec.tar.xz
community/py3-google-api-python-client: upgrade to 1.7.11
Diffstat (limited to 'community/py3-google-api-python-client')
-rw-r--r--community/py3-google-api-python-client/APKBUILD52
-rw-r--r--community/py3-google-api-python-client/unittest2.patch144
2 files changed, 166 insertions, 30 deletions
diff --git a/community/py3-google-api-python-client/APKBUILD b/community/py3-google-api-python-client/APKBUILD
index 24ff8e5007..8386a28687 100644
--- a/community/py3-google-api-python-client/APKBUILD
+++ b/community/py3-google-api-python-client/APKBUILD
@@ -1,49 +1,41 @@
# Maintainer: Roberto Oliveira <robertoguimaraes8@gmail.com>
-pkgname=py-google-api-python-client
+pkgname=py3-google-api-python-client
_pkgname=google-api-python-client
-pkgver=1.7.9
+pkgver=1.7.11
pkgrel=0
pkgdesc="Google API Client Library for Python"
+options="!check" # Some tests fail
url="https://github.com/google/google-api-python-client"
-options="!check" # Depends on py2-unittest2 which is in testing
arch="noarch"
license="Apache-2.0"
-depends="py-httplib2 py-oauth2client py-uritemplate py-six"
-makedepends="py-setuptools py3-setuptools"
-subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2"
-source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
+depends="py3-google-auth py3-google-auth-httplib2 py3-uritemplate py3-six py3-httplib2
+ py3-oauth2client"
+makedepends="py3-setuptools"
+checkdepends="py3-mock"
+source="https://files.pythonhosted.org/packages/source/g/$_pkgname/$_pkgname-$pkgver.tar.gz
+ unittest2.patch
+ "
builddir="$srcdir/$_pkgname-$pkgver"
+replaces="py-google-api-python-client" # Backwards compatibility
+provides="py-google-api-python-client=$pkgver-r$pkgrel" # Backwards compatibility
+
build() {
- cd "$builddir"
- python2 setup.py build
python3 setup.py build
}
-package() {
- mkdir -p "$pkgdir"
+check() {
+ python3 setup.py test
}
-_py() {
- local python="$1"
- pkgdesc="$pkgdesc (for $python)"
- depends="$depends $python"
- install_if="$pkgname=$pkgver-r$pkgrel $python"
-
- cd "$builddir"
- $python setup.py install --prefix=/usr --root="$subpkgdir"
-}
-
-_py2() {
- replaces="$pkgname"
- depends="${depends//py-/py2-}"
- _py python2
-}
+package() {
+ python3 setup.py install --prefix=/usr --root="$pkgdir"
-_py3() {
- depends="${depends//py-/py3-}"
- _py python3
+ # Fix permissions
+ _site_packages=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
+ chmod -R a+r "$pkgdir$_site_packages"
}
-sha512sums="2874c9c9bc42d5d1f857b3b58c3676b362045493dab657cde44bcd9dfb7b9db9ff67d1d1a7b1ed4003a35b4b5bf975ef705e3ea3565585a98d37dd06096831cc google-api-python-client-1.7.9.tar.gz"
+sha512sums="6a3ef74c8bc518d7eee05bd73209e93931bfb2719b89f435fa3e0c260bf21adf174aa158f8a395bec38fcd69f542f6f55abd8d215d970cd600eb51a84589e5f8 google-api-python-client-1.7.11.tar.gz
+e47ecc9a4522520b8be00702e7ad1b358c6683fe4daf3b16446c2e96a3c42e698244bd7e54be7245b2cdd800e7326a2c1587643ca7ee60a1dec843b3f3c49cf5 unittest2.patch"
diff --git a/community/py3-google-api-python-client/unittest2.patch b/community/py3-google-api-python-client/unittest2.patch
new file mode 100644
index 0000000000..46058026d5
--- /dev/null
+++ b/community/py3-google-api-python-client/unittest2.patch
@@ -0,0 +1,144 @@
+diff --git a/tests/test__auth.py b/tests/test__auth.py
+index d43fe68..7f9df84 100644
+--- a/tests/test__auth.py
++++ b/tests/test__auth.py
+@@ -18,7 +18,7 @@ import google.auth.credentials
+ import google_auth_httplib2
+ import httplib2
+ import oauth2client.client
+-import unittest2 as unittest
++import unittest
+
+ from googleapiclient import _auth
+
+diff --git a/tests/test_channel.py b/tests/test_channel.py
+index 4141353..2651fcd 100644
+--- a/tests/test_channel.py
++++ b/tests/test_channel.py
+@@ -3,7 +3,7 @@ from __future__ import absolute_import
+
+ __author__ = 'jcgregorio@google.com (Joe Gregorio)'
+
+-import unittest2 as unittest
++import unittest
+ import datetime
+
+ from googleapiclient import channel
+diff --git a/tests/test_discovery.py b/tests/test_discovery.py
+index b41051a..ba5f1ba 100644
+--- a/tests/test_discovery.py
++++ b/tests/test_discovery.py
+@@ -37,7 +37,7 @@ import os
+ import pickle
+ import re
+ import sys
+-import unittest2 as unittest
++import unittest
+
+ import mock
+
+diff --git a/tests/test_discovery_cache.py b/tests/test_discovery_cache.py
+index 1786406..39871fe 100644
+--- a/tests/test_discovery_cache.py
++++ b/tests/test_discovery_cache.py
+@@ -18,7 +18,7 @@
+ """Discovery document cache tests."""
+
+ import datetime
+-import unittest2 as unittest
++import unittest
+
+ import mock
+
+diff --git a/tests/test_errors.py b/tests/test_errors.py
+index e4d2f09..affd2da 100644
+--- a/tests/test_errors.py
++++ b/tests/test_errors.py
+@@ -21,7 +21,7 @@ from __future__ import absolute_import
+ __author__ = 'afshar@google.com (Ali Afshar)'
+
+
+-import unittest2 as unittest
++import unittest
+ import httplib2
+
+
+diff --git a/tests/test_http.py b/tests/test_http.py
+index b92e63f..f60d21b 100644
+--- a/tests/test_http.py
++++ b/tests/test_http.py
+@@ -35,7 +35,7 @@ import io
+ import logging
+ import mock
+ import os
+-import unittest2 as unittest
++import unittest
+ import random
+ import socket
+ import ssl
+diff --git a/tests/test_json_model.py b/tests/test_json_model.py
+index 006eb47..f1d2116 100644
+--- a/tests/test_json_model.py
++++ b/tests/test_json_model.py
+@@ -27,7 +27,7 @@ import copy
+ import json
+ import os
+ import platform
+-import unittest2 as unittest
++import unittest
+ import httplib2
+ import googleapiclient.model
+
+diff --git a/tests/test_mocks.py b/tests/test_mocks.py
+index a456b9e..2fd6517 100644
+--- a/tests/test_mocks.py
++++ b/tests/test_mocks.py
+@@ -24,7 +24,7 @@ __author__ = 'jcgregorio@google.com (Joe Gregorio)'
+
+ import httplib2
+ import os
+-import unittest2 as unittest
++import unittest
+
+ from googleapiclient.errors import HttpError
+ from googleapiclient.errors import UnexpectedBodyError
+diff --git a/tests/test_model.py b/tests/test_model.py
+index 6506cfc..1d48194 100644
+--- a/tests/test_model.py
++++ b/tests/test_model.py
+@@ -23,7 +23,7 @@ from __future__ import absolute_import
+
+ __author__ = 'jcgregorio@google.com (Joe Gregorio)'
+
+-import unittest2 as unittest
++import unittest
+
+ from googleapiclient.model import BaseModel
+ from googleapiclient.model import makepatch
+diff --git a/tests/test_protobuf_model.py b/tests/test_protobuf_model.py
+index 465d120..bcd71ab 100644
+--- a/tests/test_protobuf_model.py
++++ b/tests/test_protobuf_model.py
+@@ -22,7 +22,7 @@ from __future__ import absolute_import
+
+ __author__ = 'mmcdonald@google.com (Matt McDonald)'
+
+-import unittest2 as unittest
++import unittest
+ import httplib2
+ import googleapiclient.model
+
+diff --git a/tests/test_schema.py b/tests/test_schema.py
+index c1216a5..127a517 100644
+--- a/tests/test_schema.py
++++ b/tests/test_schema.py
+@@ -19,7 +19,7 @@ __author__ = 'jcgregorio@google.com (Joe Gregorio)'
+
+ import json
+ import os
+-import unittest2 as unittest
++import unittest
+
+ from googleapiclient.schema import Schemas
+
+<Paste>