Gentoo Archives: gentoo-commits

From: Mike Frysinger <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/google-apitools/, dev-python/google-apitools/files/
Date: Thu, 29 Mar 2018 04:58:13
Message-Id: 1522299480.d983457cbdc8161d73e4942448f6b09a458cc15b.vapier@gentoo
1 commit: d983457cbdc8161d73e4942448f6b09a458cc15b
2 Author: Mike Frysinger <vapier <AT> chromium <DOT> org>
3 AuthorDate: Thu Mar 29 04:55:19 2018 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 29 04:58:00 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d983457c
7
8 dev-python/google-apitools: drop cli/test/sample modules
9
10 Talking to upstream, the cli modules aren't generally useful, and gsutil
11 (the only user of this currently) doesn't need it. By dropping that, we
12 can drop the deprecated google-apputils project which doesn't support
13 py3. We also clean up the install of unused sample & test modules. Now
14 we can make it support python-3.
15
16 .../files/google-apitools-0.5.22-drop-cli.patch | 21 ++++++++++
17 .../google-apitools-0.5.22-r1.ebuild | 48 ++++++++++++++++++++++
18 2 files changed, 69 insertions(+)
19
20 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
21 new file mode 100644
22 index 00000000000..cae369deefc
23 --- /dev/null
24 +++ b/dev-python/google-apitools/files/google-apitools-0.5.22-drop-cli.patch
25 @@ -0,0 +1,21 @@
26 +we don't have code currently that uses the CLI tools, and the CLI tools require
27 +the apputils project, and that doesn't currently work with python3. drop it for
28 +now to get general python3 support.
29 +https://github.com/google/apitools/issues/8
30 +
31 +--- a/setup.py
32 ++++ b/setup.py
33 +@@ -69,13 +69,7 @@ setuptools.setup(
34 + author_email='craigcitro@××××××.com',
35 + # Contained modules and scripts.
36 + packages=setuptools.find_packages(),
37 +- entry_points={'console_scripts': CONSOLE_SCRIPTS},
38 + install_requires=REQUIRED_PACKAGES,
39 +- tests_require=REQUIRED_PACKAGES + CLI_PACKAGES + TESTING_PACKAGES,
40 +- extras_require={
41 +- 'cli': CLI_PACKAGES,
42 +- 'testing': TESTING_PACKAGES,
43 +- },
44 + # Add in any packaged data.
45 + include_package_data=True,
46 + package_data={
47
48 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
49 new file mode 100644
50 index 00000000000..cf9076ca560
51 --- /dev/null
52 +++ b/dev-python/google-apitools/google-apitools-0.5.22-r1.ebuild
53 @@ -0,0 +1,48 @@
54 +# Copyright 1999-2018 Gentoo Foundation
55 +# Distributed under the terms of the GNU General Public License v2
56 +
57 +# We strip out the tests & cli code as it relies on google-apputils, and that
58 +# module hasn't been ported to python-3. No one currently relies on them, so
59 +# we drop them for the sake of gaining python-3.
60 +# https://github.com/google/apitools/issues/8
61 +
62 +EAPI="5"
63 +
64 +PYTHON_COMPAT=( python{2_7,3_6} )
65 +
66 +inherit distutils-r1
67 +
68 +DESCRIPTION="Python library to manipulate Google APIs"
69 +HOMEPAGE="https://github.com/google/apitools"
70 +SRC_URI="https://github.com/google/apitools/archive/v${PV}.tar.gz -> ${P}.tar.gz"
71 +
72 +LICENSE="Apache-2.0"
73 +SLOT="0"
74 +KEYWORDS="~amd64 ~arm ~x86"
75 +IUSE=""
76 +
77 +RDEPEND=">=dev-python/httplib2-0.8[${PYTHON_USEDEP}]
78 + >=dev-python/fasteners-0.14[${PYTHON_USEDEP}]
79 + >=dev-python/oauth2client-1.5.2[${PYTHON_USEDEP}]
80 + >=dev-python/six-1.9.0[${PYTHON_USEDEP}]"
81 +DEPEND="${RDEPEND}
82 + >=dev-python/setuptools-18.5[${PYTHON_USEDEP}]"
83 +# See comment above about py3 support.
84 +RESTRICT="test"
85 +
86 +S="${WORKDIR}/apitools-${PV}"
87 +
88 +PATCHES=(
89 + "${FILESDIR}"/${PN}-0.5.22-use-friendy-version-checks.patch
90 + "${FILESDIR}"/${PN}-0.5.22-drop-cli.patch
91 +)
92 +
93 +src_unpack() {
94 + default
95 +
96 + # Nuke modules that we don't need.
97 + cd "${S}"
98 + rm -r samples || die
99 + find -name '*_test.py' -delete || die
100 + find -name testdata -exec rm -r {} + || die
101 +}