Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@××××××.net>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: dev-python/pure-protobuf/, dev-python/pure-protobuf/files/
Date: Mon, 04 May 2020 08:38:26
Message-Id: 1588581493.5a2e27ff548a3508efca16179b32b370366f70ea.andrewammerlaan@gentoo
1 commit: 5a2e27ff548a3508efca16179b32b370366f70ea
2 Author: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
3 AuthorDate: Mon May 4 08:38:13 2020 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
5 CommitDate: Mon May 4 08:38:13 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=5a2e27ff
7
8 dev-python/pure-protobuf: patch exclude variable in setup.py
9
10 we used the python_foreach_impl function wrong
11
12 python_install is already run with python_foreach_impl,
13 thus the function should not be used inside python_install
14
15 for this there is python_install_all, but this is run after
16 python_foreach_impl python_install so we again get the
17 '${P} installs tests' error. Instead I just patched
18 a fix, this fix is also already in upstream master
19
20 Package-Manager: Portage-2.3.99, Repoman-2.3.22
21 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>
22
23 .../files/pure-protobuf-do-not-install-tests.patch | 13 +++++++++
24 .../pure-protobuf/pure-protobuf-2.0.0-r1.ebuild | 9 +-----
25 .../pure-protobuf/pure-protobuf-2.0.0.ebuild | 32 ----------------------
26 3 files changed, 14 insertions(+), 40 deletions(-)
27
28 diff --git a/dev-python/pure-protobuf/files/pure-protobuf-do-not-install-tests.patch b/dev-python/pure-protobuf/files/pure-protobuf-do-not-install-tests.patch
29 new file mode 100644
30 index 0000000..6da5a8d
31 --- /dev/null
32 +++ b/dev-python/pure-protobuf/files/pure-protobuf-do-not-install-tests.patch
33 @@ -0,0 +1,13 @@
34 +diff --git a/setup.py b/setup.py
35 +index deb6c95..2ae6c69 100644
36 +--- a/setup.py
37 ++++ b/setup.py
38 +@@ -9,7 +9,7 @@ setup(
39 + author='Pavel Perestoronin',
40 + author_email='eigenein@×××××.com',
41 + url='https://github.com/eigenein/protobuf',
42 +- packages=find_packages(exclude=['tests']),
43 ++ packages=find_packages(exclude=['tests*']),
44 + zip_safe=True,
45 + install_requires=[
46 + 'dataclasses>=0.6,<1.0; python_version < "3.7"',
47
48 diff --git a/dev-python/pure-protobuf/pure-protobuf-2.0.0-r1.ebuild b/dev-python/pure-protobuf/pure-protobuf-2.0.0-r1.ebuild
49 index e240faf..5cb93b6 100644
50 --- a/dev-python/pure-protobuf/pure-protobuf-2.0.0-r1.ebuild
51 +++ b/dev-python/pure-protobuf/pure-protobuf-2.0.0-r1.ebuild
52 @@ -22,11 +22,4 @@ S="${WORKDIR}/protobuf-${PV}"
53
54 distutils_enable_tests pytest
55
56 -python_install() {
57 - # Package installs 'tests' package which is forbidden and likely a bug in the build system.
58 - rm -r tests || die
59 -
60 - # Previously it did not actually install any python libs
61 - python_foreach_impl esetup.py install
62 - python_foreach_impl python_optimize
63 -}
64 +PATCHES="${FILESDIR}/${PN}-do-not-install-tests.patch"
65
66 diff --git a/dev-python/pure-protobuf/pure-protobuf-2.0.0.ebuild b/dev-python/pure-protobuf/pure-protobuf-2.0.0.ebuild
67 deleted file mode 100644
68 index e240faf..0000000
69 --- a/dev-python/pure-protobuf/pure-protobuf-2.0.0.ebuild
70 +++ /dev/null
71 @@ -1,32 +0,0 @@
72 -# Copyright 1999-2020 Gentoo Authors
73 -# Distributed under the terms of the GNU General Public License v2
74 -
75 -EAPI=7
76 -
77 -PYTHON_COMPAT=( python3_7 )
78 -
79 -inherit distutils-r1
80 -
81 -DESCRIPTION="A more Pythonic version of doxypy, a Doxygen filter for Python"
82 -HOMEPAGE="
83 - https://github.com/eigenein/protobuf
84 - https://pypi.org/project/pure-protobuf/
85 -"
86 -SRC_URI="https://github.com/eigenein/protobuf/archive/${PV}.tar.gz -> ${P}.tar.gz"
87 -
88 -LICENSE="MIT"
89 -SLOT="0"
90 -KEYWORDS="~amd64"
91 -
92 -S="${WORKDIR}/protobuf-${PV}"
93 -
94 -distutils_enable_tests pytest
95 -
96 -python_install() {
97 - # Package installs 'tests' package which is forbidden and likely a bug in the build system.
98 - rm -r tests || die
99 -
100 - # Previously it did not actually install any python libs
101 - python_foreach_impl esetup.py install
102 - python_foreach_impl python_optimize
103 -}