diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-05-17 14:32:10 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-05-17 14:32:10 +0100 |
commit | 51c50bd4c895ebf56d81fecae8e45ec3b5fc3efa (patch) | |
tree | 753b6b08624c34d1ed8414bbe22c45409f7741b9 /dev-python/oauth2client | |
parent | be9d77d3ac6af8f4ead98d89706f356b65578c93 (diff) | |
parent | deba8115d2c2af26df42966b91ef04ff4dd79cde (diff) |
Merge branch 'edge' into next
Diffstat (limited to 'dev-python/oauth2client')
-rw-r--r-- | dev-python/oauth2client/Manifest | 2 | ||||
-rw-r--r-- | dev-python/oauth2client/files/oauth2client-4.1.3-py38.patch | 35 | ||||
-rw-r--r-- | dev-python/oauth2client/oauth2client-4.1.3-r1.ebuild | 61 |
3 files changed, 98 insertions, 0 deletions
diff --git a/dev-python/oauth2client/Manifest b/dev-python/oauth2client/Manifest index 41786cb2ae73..7525a95a9c23 100644 --- a/dev-python/oauth2client/Manifest +++ b/dev-python/oauth2client/Manifest @@ -1,3 +1,5 @@ +AUX oauth2client-4.1.3-py38.patch 1782 BLAKE2B 751b62649cd7222230f809c7e957636e351cddb3588c1da112443b09067c73cc6ada588697dd36f9b6ed2115238f8f811bc5502b17c75b2f65be655b4199dc9f SHA512 3e03d7105e76206e63858a32a25dfd5bbf997ced6abafd75d0f4973528ee91cb28200854ccfa519945573992f454c18d2acad5784693acffc7509ddcb13908a8 DIST oauth2client-4.1.3.tar.gz 185589 BLAKE2B 6cd61448e0d55cef7f2ba640c8cbb50ac83e76d0993391eb0acb3e156f937fcdee80576c9d45d505235a9f266495069664ccbfafd649a4e2d7a0990517ee8cb6 SHA512 80f49e09a6dd6767307a2c278544926fbf20b4f55e4cf83563ac7a7c1043622bd3c8c7fcf6de62896b623ca8c7947b309a5e6bf2b7cb0fccff3ff7634386b287 +EBUILD oauth2client-4.1.3-r1.ebuild 1805 BLAKE2B 909428391f8b2ea08e45e7dcaf36c846bbc25c0051a45d50d9f5f063157c2f92a2ab55898f7883a5f3a3c3aafe07db7cef21479a5722252724fc8a393a19b1cc SHA512 01c53dc5dd9bfcd42b03ec6d7465688454ceab352fdee846836873fd7b2660c9df57c0a26b6cbdf5b157219405e1e26ee68b8063ff78e202a107fd6935b993a4 EBUILD oauth2client-4.1.3.ebuild 1675 BLAKE2B 45e8323c902abc49e1f3f5813114935a57a545c89f5f4609220bab244e14e7d16c102654679f85aa3fcaa5c03c1a0b20e96a5df311bd8059741e9a5ce5b4368f SHA512 6de3dbeae6b0aafaf8f8c23c5e133716eda43a3e959a1880223969de8e3dbb87d587b9b1f60ef5ef0cb17234909d4c6273aba740eb586a87363e9343a9bd5781 MISC metadata.xml 334 BLAKE2B 474087a66809e8ad113f10c3f674b5684858d0eb67d58f54d19557f9a32295f96c587aa945eb6b4fbe338690a096fb59109f907902cd4e08f40c4d62f5dc7e54 SHA512 585f6ddeaa1a11022fcb9bab897e02392157abca2e638cfef57d76a97be2d85071405bbd70a256172d6202e4a4deca47ddb2374b98cd810e60541c2d4d3d373c 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/oauth2client-4.1.3-r1.ebuild b/dev-python/oauth2client/oauth2client-4.1.3-r1.ebuild new file mode 100644 index 000000000000..36afd8a2e568 --- /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/google/oauth2client" +SRC_URI="https://github.com/google/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 +} |