commit:     4644ff18014566d65fdbda87b8fafd6f76b24a99
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  5 11:10:20 2021 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Jul  5 11:10:20 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4644ff18

dev-python/google-api-python-client: Eliminate unittest2

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../google-api-python-client-2.11.0.ebuild                         | 7 ++++++-
 .../google-api-python-client/google-api-python-client-2.8.0.ebuild | 7 ++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git 
a/dev-python/google-api-python-client/google-api-python-client-2.11.0.ebuild 
b/dev-python/google-api-python-client/google-api-python-client-2.11.0.ebuild
index 53fb3737825..08eb44b4eda 100644
--- a/dev-python/google-api-python-client/google-api-python-client-2.11.0.ebuild
+++ b/dev-python/google-api-python-client/google-api-python-client-2.11.0.ebuild
@@ -32,11 +32,16 @@ BDEPEND="
                dev-python/oauth2client[${PYTHON_USEDEP}]
                dev-python/pandas[${PYTHON_USEDEP}]
                dev-python/parameterized[${PYTHON_USEDEP}]
-               dev-python/unittest2[${PYTHON_USEDEP}]
        )"
 
 distutils_enable_tests --install pytest
 
+src_prepare() {
+       find tests -name '*.py' -exec \
+               sed -i -e 's:unittest2 as ::' {} + || die
+       distutils-r1_src_prepare
+}
+
 python_test() {
        local deselect=(
                # require Internet access (and credentials)

diff --git 
a/dev-python/google-api-python-client/google-api-python-client-2.8.0.ebuild 
b/dev-python/google-api-python-client/google-api-python-client-2.8.0.ebuild
index 69b970850c5..e52f1f75567 100644
--- a/dev-python/google-api-python-client/google-api-python-client-2.8.0.ebuild
+++ b/dev-python/google-api-python-client/google-api-python-client-2.8.0.ebuild
@@ -32,11 +32,16 @@ BDEPEND="
                dev-python/oauth2client[${PYTHON_USEDEP}]
                dev-python/pandas[${PYTHON_USEDEP}]
                dev-python/parameterized[${PYTHON_USEDEP}]
-               dev-python/unittest2[${PYTHON_USEDEP}]
        )"
 
 distutils_enable_tests --install pytest
 
+src_prepare() {
+       find tests -name '*.py' -exec \
+               sed -i -e 's:unittest2 as ::' {} + || die
+       distutils-r1_src_prepare
+}
+
 python_test() {
        local deselect=(
                # require Internet access (and credentials)

Reply via email to