summaryrefslogtreecommitdiff
path: root/dev-python/oauth2client
diff options
context:
space:
mode:
authorPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
committerPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
commitecdac123787b96ce6649f0f91da12ea6458cc2b1 (patch)
treeb89c74d9e6fe6e8aebc4c77bcbeb4ab73214127d /dev-python/oauth2client
parent1be72aa41cf41dedadeecf59dca9f01de6381f5e (diff)
downloadbaldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.gz
baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.xz
baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.zip
Updating liguros repo
Diffstat (limited to 'dev-python/oauth2client')
-rw-r--r--dev-python/oauth2client/Manifest1
-rw-r--r--dev-python/oauth2client/files/oauth2client-4.1.3-py38.patch35
-rw-r--r--dev-python/oauth2client/metadata.xml12
-rw-r--r--dev-python/oauth2client/oauth2client-4.1.3-r1.ebuild61
-rw-r--r--dev-python/oauth2client/oauth2client-4.1.3.ebuild52
5 files changed, 161 insertions, 0 deletions
diff --git a/dev-python/oauth2client/Manifest b/dev-python/oauth2client/Manifest
new file mode 100644
index 000000000000..4ad1dc297cab
--- /dev/null
+++ b/dev-python/oauth2client/Manifest
@@ -0,0 +1 @@
+DIST oauth2client-4.1.3.tar.gz 185589 BLAKE2B 6cd61448e0d55cef7f2ba640c8cbb50ac83e76d0993391eb0acb3e156f937fcdee80576c9d45d505235a9f266495069664ccbfafd649a4e2d7a0990517ee8cb6 SHA512 80f49e09a6dd6767307a2c278544926fbf20b4f55e4cf83563ac7a7c1043622bd3c8c7fcf6de62896b623ca8c7947b309a5e6bf2b7cb0fccff3ff7634386b287
diff --git a/dev-python/oauth2client/files/oauth2client-4.1.3-py38.patch b/dev-python/oauth2client/files/oauth2client-4.1.3-py38.patch
new file mode 100644
index 000000000000..d0898c02036a
--- /dev/null
+++ b/dev-python/oauth2client/files/oauth2client-4.1.3-py38.patch
@@ -0,0 +1,35 @@
+diff --git a/oauth2client/contrib/xsrfutil.py b/oauth2client/contrib/xsrfutil.py
+index 7c3ec03..20f35c9 100644
+--- a/oauth2client/contrib/xsrfutil.py
++++ b/oauth2client/contrib/xsrfutil.py
+@@ -44,7 +44,7 @@ def generate_token(key, user_id, action_id='', when=None):
+ Returns:
+ A string XSRF protection token.
+ """
+- digester = hmac.new(_helpers._to_bytes(key, encoding='utf-8'))
++ digester = hmac.new(_helpers._to_bytes(key, encoding='utf-8'), digestmod='MD5')
+ digester.update(_helpers._to_bytes(str(user_id), encoding='utf-8'))
+ digester.update(DELIMITER)
+ digester.update(_helpers._to_bytes(action_id, encoding='utf-8'))
+diff --git a/tests/contrib/test_xsrfutil.py b/tests/contrib/test_xsrfutil.py
+index 3115827..deae568 100644
+--- a/tests/contrib/test_xsrfutil.py
++++ b/tests/contrib/test_xsrfutil.py
+@@ -54,7 +54,7 @@ class Test_generate_token(unittest.TestCase):
+ TEST_USER_ID_1,
+ action_id=TEST_ACTION_ID_1,
+ when=TEST_TIME)
+- hmac.new.assert_called_once_with(TEST_KEY)
++ hmac.new.assert_called_once_with(TEST_KEY, digestmod='MD5')
+ digester.digest.assert_called_once_with()
+
+ expected_digest_calls = [
+@@ -87,7 +87,7 @@ class Test_generate_token(unittest.TestCase):
+ TEST_USER_ID_1,
+ action_id=TEST_ACTION_ID_1)
+
+- hmac.new.assert_called_once_with(TEST_KEY)
++ hmac.new.assert_called_once_with(TEST_KEY, digestmod='MD5')
+ time.time.assert_called_once_with()
+ digester.digest.assert_called_once_with()
+
diff --git a/dev-python/oauth2client/metadata.xml b/dev-python/oauth2client/metadata.xml
new file mode 100644
index 000000000000..4ada85f743fa
--- /dev/null
+++ b/dev-python/oauth2client/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">googleapis/oauth2client</remote-id>
+ </upstream>
+ <origin>gentoo-staging</origin>
+</pkgmetadata>
diff --git a/dev-python/oauth2client/oauth2client-4.1.3-r1.ebuild b/dev-python/oauth2client/oauth2client-4.1.3-r1.ebuild
new file mode 100644
index 000000000000..3563b832a5a6
--- /dev/null
+++ b/dev-python/oauth2client/oauth2client-4.1.3-r1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python3_{6,7,8} )
+
+inherit distutils-r1
+
+DESCRIPTION="Library for accessing resources protected by OAuth 2.0"
+HOMEPAGE="https://github.com/googleapis/oauth2client"
+SRC_URI="https://github.com/googleapis/oauth2client/archive/v${PV/_p/-post}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}"/${P/_p/-post}
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="|| ( $(python_gen_useflags 'python*') )"
+
+RDEPEND="
+ >=dev-python/httplib2-0.9.1[${PYTHON_USEDEP}]
+ >=dev-python/pyasn1-0.1.7[${PYTHON_USEDEP}]
+ >=dev-python/pyasn1-modules-0.0.5[${PYTHON_USEDEP}]
+ >=dev-python/rsa-3.1.4[${PYTHON_USEDEP}]
+ >=dev-python/six-1.6.1[${PYTHON_USEDEP}]
+ dev-python/keyring[${PYTHON_USEDEP}]
+ !<=dev-python/google-api-python-client-1.1[${PYTHON_USEDEP}]
+"
+BDEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? ( ${RDEPEND}
+ dev-python/sqlalchemy[${PYTHON_USEDEP}]
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/oauth2client-4.1.3-py38.patch"
+)
+
+python_prepare() {
+ # keyring is not fuly supported by pypy yet, because dbus-python can't support pypy
+ # oauth2client -> keyring -> secretstorage -> dbus-python
+ # https://github.com/mitya57/secretstorage/issues/10
+ case $PYTHON in
+ pypy|*pypy|*pypy3|pypy3) \
+ find "${BUILD_DIR}/.." -name '*keyring*py' -delete ;;
+ esac
+}
+
+python_test() {
+ nosetests -v \
+ -e appengine \
+ -e django_util \
+ -e test_multiprocess_file_storage \
+ -e test_bad_positional || die "tests fail with ${EPYTHON}"
+ # appengine - requires appengine
+ # django_util - requires django
+ # test_multiprocess_file_storage - requires fasteners
+ # test_bad_positional - expects TypeError, gets ValueError
+}
diff --git a/dev-python/oauth2client/oauth2client-4.1.3.ebuild b/dev-python/oauth2client/oauth2client-4.1.3.ebuild
new file mode 100644
index 000000000000..5901030b4f92
--- /dev/null
+++ b/dev-python/oauth2client/oauth2client-4.1.3.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python3_{6,7} )
+
+inherit distutils-r1
+
+DESCRIPTION="Library for accessing resources protected by OAuth 2.0"
+HOMEPAGE="https://github.com/googleapis/oauth2client"
+SRC_URI="https://github.com/googleapis/oauth2client/archive/v${PV/_p/-post}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~arm64 x86 ~amd64-linux ~x86-linux"
+IUSE="test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="|| ( $(python_gen_useflags 'python*') )"
+
+RDEPEND="
+ >=dev-python/httplib2-0.9.1[${PYTHON_USEDEP}]
+ >=dev-python/pyasn1-0.1.7[${PYTHON_USEDEP}]
+ >=dev-python/pyasn1-modules-0.0.5[${PYTHON_USEDEP}]
+ >=dev-python/rsa-3.1.4[${PYTHON_USEDEP}]
+ >=dev-python/six-1.6.1[${PYTHON_USEDEP}]
+ dev-python/keyring[${PYTHON_USEDEP}]
+ !<=dev-python/google-api-python-client-1.1[${PYTHON_USEDEP}]
+"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? ( dev-python/nose[${PYTHON_USEDEP}] )
+"
+
+S="${WORKDIR}"/${P/_p/-post}
+
+python_prepare() {
+ # keyring is not fuly supported by pypy yet, because dbus-python can't support pypy
+ # oauth2client -> keyring -> secretstorage -> dbus-python
+ # https://github.com/mitya57/secretstorage/issues/10
+ case $PYTHON in
+ pypy|*pypy|*pypy3|pypy3) \
+ find "${BUILD_DIR}/.." -name '*keyring*py' -delete ;;
+ esac
+}
+
+python_test() {
+ nosetests -e appengine -e django_util -e test_multiprocess_file_storage -e test_bad_positional || die
+ # appengine - requires appengine
+ # django_util - requires django
+ # test_multiprocess_file_storage - requires fasteners
+ # test_bad_positional - expects TypeError, gets ValueError
+}