diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2023-02-07 17:11:06 -0800 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2023-02-07 21:57:43 -0800 |
commit | 8cd0fa745bf3ae6325ee3a812e73de201e74c429 (patch) | |
tree | dca0cb355d0a9dd9d03245b6ab9d17f409dd669a /dev-python | |
parent | sys-kernel/rt-sources: add 5.15.92_p57, drop 5.15.86_p56 (diff) | |
download | gentoo-8cd0fa745bf3ae6325ee3a812e73de201e74c429.tar.gz gentoo-8cd0fa745bf3ae6325ee3a812e73de201e74c429.tar.bz2 gentoo-8cd0fa745bf3ae6325ee3a812e73de201e74c429.zip |
dev-python/oauth2client: updates
- Patching to support Py3.8..Py3.11
- Exclude broken upstream contrib django & flask
- Convert nose -> pytest
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Closes: https://bugs.gentoo.org/718972
Diffstat (limited to 'dev-python')
-rw-r--r-- | dev-python/oauth2client/Manifest | 1 | ||||
-rw-r--r-- | dev-python/oauth2client/oauth2client-4.1.3-r3.ebuild | 85 |
2 files changed, 86 insertions, 0 deletions
diff --git a/dev-python/oauth2client/Manifest b/dev-python/oauth2client/Manifest index 4ad1dc297cab..d913489a234e 100644 --- a/dev-python/oauth2client/Manifest +++ b/dev-python/oauth2client/Manifest @@ -1 +1,2 @@ +DIST oauth2client-4.1.3-fixes-20230207.patch 21827 BLAKE2B c04886be0efad92fff75f0d78c5597bbc386939001f1fc5d094f96899bcc25bbd80c4e620cdf401a45c7ed48a8c83515adc98a190cecbbd345f55b78ca4a0257 SHA512 4d648aff20e56628c6fa916627851d7bb50f927c1cb1a056e115130e0aec128e7e2a5571b4a35a167bbcf01762669c22008cffd5530e0006846250d32b3f8093 DIST oauth2client-4.1.3.tar.gz 185589 BLAKE2B 6cd61448e0d55cef7f2ba640c8cbb50ac83e76d0993391eb0acb3e156f937fcdee80576c9d45d505235a9f266495069664ccbfafd649a4e2d7a0990517ee8cb6 SHA512 80f49e09a6dd6767307a2c278544926fbf20b4f55e4cf83563ac7a7c1043622bd3c8c7fcf6de62896b623ca8c7947b309a5e6bf2b7cb0fccff3ff7634386b287 diff --git a/dev-python/oauth2client/oauth2client-4.1.3-r3.ebuild b/dev-python/oauth2client/oauth2client-4.1.3-r3.ebuild new file mode 100644 index 000000000000..fd404d1b6b8e --- /dev/null +++ b/dev-python/oauth2client/oauth2client-4.1.3-r3.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{9..11} ) + +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 + https://dev.gentoo.org/~robbat2/distfiles/oauth2client-4.1.3-fixes-20230207.patch + " +S="${WORKDIR}"/${P/_p/-post} + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux" + +# This package supports 3 different crypto options, but tests ALL of them +CRYPTO_A=">=dev-python/pycryptodome-2.6[${PYTHON_USEDEP}]" +CRYPTO_B="dev-python/pyopenssl[${PYTHON_USEDEP}]" +CRYPTO_C="( + >=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}] + )" + +RDEPEND=" + >=dev-python/httplib2-0.9.1[${PYTHON_USEDEP}] + >=dev-python/six-1.6.1[${PYTHON_USEDEP}] + || ( ${CRYPTO_A} ${CRYPTO_B} ${CRYPTO_C} ) + dev-python/keyring[${PYTHON_USEDEP}] + !<=dev-python/google-api-python-client-1.1[${PYTHON_USEDEP}] +" + +# Not well-tested upstream, and broken: +# django dev-python/django[${PYTHON_USEDEP}] +# flask dev-python/flask[${PYTHON_USEDEP}] +BDEPEND=" + test? ( + dev-python/mock[${PYTHON_USEDEP}] + dev-python/sqlalchemy[${PYTHON_USEDEP}] + dev-python/fasteners[${PYTHON_USEDEP}] + ${CRYPTO_A} + ${CRYPTO_B} + ${CRYPTO_C} + ) +" + +distutils_enable_tests pytest + +PATCHES=( + "${DISTDIR}/oauth2client-4.1.3-fixes-20230207.patch" +) + +src_prepare() { + default + # These contrib modules are broken upstream: + REMOVE=( + # django + "${S}"/oauth2client/contrib/django_util/ + "${S}"/samples/django/ + "${S}"/tests/contrib/django_util/ + "${S}"/docs/source/oauth2client.contrib.django* + # flask + "${S}"/docs/source/oauth2client.contrib.flask_util.rst + "${S}"/oauth2client/contrib/flask_util.py + "${S}"/tests/contrib/test_flask_util.py + ) + rm -rf "${REMOVE[@]}" +} + +python_test() { + TEST_ARGS=( + # appengine - requires appengine + # django_util - requires django, contrib module broken upstream + # flash - requires flask, contrib module broken upstream + --ignore-glob='*appengine*' + ) + epytest "${TEST_ARGS[@]}" || die "tests fail with ${EPYTHON}" +} |