google-apitools: upgraded package to upstream

Upgraded dev-python/google-apitools to version 0.5.30 for newer gsutil.

BUG=chromium:1019337
TEST=CQ passes

Change-Id: Ie93a6b0fcd98ba39442a8ec4fc6f7821bcc579a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/overlays/portage-stable/+/2033617
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Chris McDonald <cjmcdonald@chromium.org>
diff --git a/dev-python/google-apitools/Manifest b/dev-python/google-apitools/Manifest
index 6918a62..b04e1e8 100644
--- a/dev-python/google-apitools/Manifest
+++ b/dev-python/google-apitools/Manifest
@@ -1 +1 @@
-DIST google-apitools-0.5.22.tar.gz 422977 SHA256 5f869c4d18a6c9a0fed773da7dd66b146b4d6004aa1c64dfca9a6d5b5eb21568 SHA512 f184b0ccc17ae80e8436727afab62a3e655ddecc37bde23dd144cc285461b80846fb1df24f21d75f06f521dbc28e8f3e9d5838d769ac52aff83c0aa8d1be66d5 WHIRLPOOL f4e205ae6174ea3573be22e3995e45a9a684dea082ccadefec1e24cd3cde51c140c0607b6454cd354e8d2611384c1d755ba9eaa71b1b720ff7416c0ea0f08e29
+DIST google-apitools-0.5.30.tar.gz 363524 BLAKE2B ed8477c85911f5855a449abe81b465635d3cc4e08d2915de5e882608e634f3dd9ffdda929bd8b25eb3daa5922851aa9304ffe07778cdf3a3aa629e215633515a SHA512 2dffffada829b9b962c64aab22b19cd227981819128c34f3e32515ee599297b3d5e8c97152d954110c2ef27c02737d3c30c785840b9f9767068688f62dc0b5c7
diff --git a/dev-python/google-apitools/files/google-apitools-0.5.22-drop-cli.patch b/dev-python/google-apitools/files/google-apitools-0.5.22-drop-cli.patch
deleted file mode 100644
index cae369d..0000000
--- a/dev-python/google-apitools/files/google-apitools-0.5.22-drop-cli.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-we don't have code currently that uses the CLI tools, and the CLI tools require
-the apputils project, and that doesn't currently work with python3.  drop it for
-now to get general python3 support.
-https://github.com/google/apitools/issues/8
-
---- a/setup.py
-+++ b/setup.py
-@@ -69,13 +69,7 @@ setuptools.setup(
-     author_email='craigcitro@google.com',
-     # Contained modules and scripts.
-     packages=setuptools.find_packages(),
--    entry_points={'console_scripts': CONSOLE_SCRIPTS},
-     install_requires=REQUIRED_PACKAGES,
--    tests_require=REQUIRED_PACKAGES + CLI_PACKAGES + TESTING_PACKAGES,
--    extras_require={
--        'cli': CLI_PACKAGES,
--        'testing': TESTING_PACKAGES,
--        },
-     # Add in any packaged data.
-     include_package_data=True,
-     package_data={
diff --git a/dev-python/google-apitools/files/google-apitools-0.5.22-use-friendy-version-checks.patch b/dev-python/google-apitools/files/google-apitools-0.5.22-use-friendy-version-checks.patch
deleted file mode 100644
index 4868854..0000000
--- a/dev-python/google-apitools/files/google-apitools-0.5.22-use-friendy-version-checks.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/setup.py b/setup.py
-index c0ab0b842899..2b21497dd088 100644
---- a/setup.py
-+++ b/setup.py
-@@ -36,7 +36,7 @@ REQUIRED_PACKAGES = [
- 
- CLI_PACKAGES = [
-     'google-apputils>=0.4.0',
--    'python-gflags==3.0.6',  # Starting version 3.0.7 py26 is not supported.
-+    'python-gflags>=3.0.6',
- ]
- 
- TESTING_PACKAGES = [
diff --git a/dev-python/google-apitools/files/google-apitools-0.5.30-skip-enum-test-on-new-python.patch b/dev-python/google-apitools/files/google-apitools-0.5.30-skip-enum-test-on-new-python.patch
new file mode 100644
index 0000000..6003db8
--- /dev/null
+++ b/dev-python/google-apitools/files/google-apitools-0.5.30-skip-enum-test-on-new-python.patch
@@ -0,0 +1,21 @@
+diff --git a/apitools/base/protorpclite/descriptor_test.py b/apitools/base/protorpclite/descriptor_test.py
+index fc27ec4..d518e24 100644
+--- a/apitools/base/protorpclite/descriptor_test.py
++++ b/apitools/base/protorpclite/descriptor_test.py
+@@ -16,6 +16,7 @@
+ #
+ 
+ """Tests for apitools.base.protorpclite.descriptor."""
++import sys
+ import platform
+ import types
+ 
+@@ -78,7 +79,7 @@ class DescribeEnumTest(test_util.TestCase):
+         described.check_initialized()
+         self.assertEquals(expected, described)
+ 
+-    @unittest2.skipIf('PyPy' in platform.python_implementation(),
++    @unittest2.skipIf('PyPy' in platform.python_implementation() or sys.hexversion >= 0x03060000,
+                       'todo: reenable this')
+     def testEnumWithItems(self):
+         class EnumWithItems(messages.Enum):
diff --git a/dev-python/google-apitools/google-apitools-0.5.22-r1.ebuild b/dev-python/google-apitools/google-apitools-0.5.22-r1.ebuild
deleted file mode 100644
index 0c4422c..0000000
--- a/dev-python/google-apitools/google-apitools-0.5.22-r1.ebuild
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-# We strip out the tests & cli code as it relies on google-apputils, and that
-# module hasn't been ported to python-3.  No one currently relies on them, so
-# we drop them for the sake of gaining python-3.
-# https://github.com/google/apitools/issues/8
-
-EAPI="5"
-
-PYTHON_COMPAT=( python{2_7,3_6} )
-
-inherit distutils-r1
-
-DESCRIPTION="Python library to manipulate Google APIs"
-HOMEPAGE="https://github.com/google/apitools"
-SRC_URI="https://github.com/google/apitools/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="*"
-IUSE=""
-
-RDEPEND=">=dev-python/httplib2-0.8[${PYTHON_USEDEP}]
-	>=dev-python/fasteners-0.14[${PYTHON_USEDEP}]
-	>=dev-python/oauth2client-1.5.2[${PYTHON_USEDEP}]
-	>=dev-python/six-1.9.0[${PYTHON_USEDEP}]"
-DEPEND="${RDEPEND}
-	>=dev-python/setuptools-18.5[${PYTHON_USEDEP}]"
-# See comment above about py3 support.
-RESTRICT="test"
-
-S="${WORKDIR}/apitools-${PV}"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-0.5.22-use-friendy-version-checks.patch
-	"${FILESDIR}"/${PN}-0.5.22-drop-cli.patch
-)
-
-src_unpack() {
-	default
-
-	# Nuke modules that we don't need.
-	cd "${S}"
-	rm -r samples || die
-	find -name '*_test.py' -delete || die
-	find -name testdata -exec rm -r {} + || die
-}
diff --git a/dev-python/google-apitools/google-apitools-0.5.30.ebuild b/dev-python/google-apitools/google-apitools-0.5.30.ebuild
new file mode 100644
index 0000000..6ff401d
--- /dev/null
+++ b/dev-python/google-apitools/google-apitools-0.5.30.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python{2_7,3_6} )
+
+inherit distutils-r1
+
+DESCRIPTION="Python library to manipulate Google APIs"
+HOMEPAGE="https://github.com/google/apitools"
+SRC_URI="https://github.com/google/apitools/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="*"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND=">=dev-python/httplib2-0.8[${PYTHON_USEDEP}]
+	>=dev-python/fasteners-0.14[${PYTHON_USEDEP}]
+	>=dev-python/oauth2client-1.5.2[${PYTHON_USEDEP}]
+	>=dev-python/six-1.12.0[${PYTHON_USEDEP}]
+	>=dev-python/python-gflags-3.1.2[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+	>=dev-python/setuptools-18.5[${PYTHON_USEDEP}]
+	test? (
+		dev-python/nose[${PYTHON_USEDEP}]
+		>=dev-python/unittest2-0.5.1[${PYTHON_USEDEP}]
+		>=dev-python/mock-1.0.1[${PYTHON_USEDEP}]
+	)"
+
+S="${WORKDIR}/apitools-${PV}"
+
+PATCHES=(
+	"${FILESDIR}/google-apitools-0.5.30-skip-enum-test-on-new-python.patch"
+)
+
+python_test() {
+	nosetests -v || die "tests failed with ${EPYTHON}"
+}