Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/python-distutils-extra/, dev-python/python-distutils-extra/files/
Date: Mon, 27 Apr 2020 19:52:53
Message-Id: 1588016921.9ca86cb31b2ddf3740a4e9ee11437f5f09a49ce8.mgorny@gentoo
1 commit: 9ca86cb31b2ddf3740a4e9ee11437f5f09a49ce8
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon Apr 27 19:48:41 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 27 19:48:41 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ca86cb3
7
8 dev-python/python-distutils-extra: Fix tests
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 .../files/python-distutils-extra-2.44-test.patch | 27 ++++++++++++++++++++++
13 .../python-distutils-extra-2.44.ebuild | 15 ++++++++----
14 2 files changed, 37 insertions(+), 5 deletions(-)
15
16 diff --git a/dev-python/python-distutils-extra/files/python-distutils-extra-2.44-test.patch b/dev-python/python-distutils-extra/files/python-distutils-extra-2.44-test.patch
17 new file mode 100644
18 index 00000000000..b00fc32d017
19 --- /dev/null
20 +++ b/dev-python/python-distutils-extra/files/python-distutils-extra-2.44-test.patch
21 @@ -0,0 +1,27 @@
22 +From 33026583f3b2f59bcc415fae4c1ae84bfd058817 Mon Sep 17 00:00:00 2001
23 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
24 +Date: Mon, 27 Apr 2020 21:25:37 +0200
25 +Subject: [PATCH] test: Find .egg-info file rather than guessing path (wrong)
26 +
27 +---
28 + test/auto.py | 4 +++-
29 + 1 file changed, 3 insertions(+), 1 deletion(-)
30 +
31 +diff --git a/test/auto.py b/test/auto.py
32 +index b9644ba..1d605e6 100755
33 +--- a/test/auto.py
34 ++++ b/test/auto.py
35 +@@ -734,7 +734,9 @@ print ('import iamnota.module')
36 + # parse .egg-info
37 + (o, e, s) = self.setup_py(['install_egg_info', '-d', self.install_tree])
38 + self.assertEqual(e, 'ERROR: Python module unknown not found\n')
39 +- egg = self._installed_contents('foo-0.1.egg-info').splitlines()
40 ++ egg_paths = [x for x in inst if x.endswith('.egg-info')]
41 ++ self.assertEqual(len(egg_paths), 1)
42 ++ egg = self._installed_contents(egg_paths[0].strip(os.path.sep)).splitlines()
43 + self.assertIn('Name: foo', egg)
44 +
45 + # check provides
46 +--
47 +2.26.2
48 +
49
50 diff --git a/dev-python/python-distutils-extra/python-distutils-extra-2.44.ebuild b/dev-python/python-distutils-extra/python-distutils-extra-2.44.ebuild
51 index c279a3684ff..8952cf77dcd 100644
52 --- a/dev-python/python-distutils-extra/python-distutils-extra-2.44.ebuild
53 +++ b/dev-python/python-distutils-extra/python-distutils-extra-2.44.ebuild
54 @@ -18,14 +18,19 @@ SRC_URI="
55 LICENSE="GPL-2+"
56 SLOT="0"
57 KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
58 +IUSE="test"
59 +RESTRICT="!test? ( test )"
60
61 DOCS=( doc/{README,FAQ} )
62
63 -src_prepare() {
64 - sed -e 's:test_requires_provides:_&:' \
65 - -i test/auto.py || die
66 - distutils-r1_src_prepare
67 -}
68 +BDEPEND="
69 + dev-libs/gobject-introspection
70 + dev-python/httplib2
71 + dev-python/pygobject"
72 +
73 +PATCHES=(
74 + "${FILESDIR}"/python-distutils-extra-2.44-test.patch
75 +)
76
77 python_test() {
78 unset PYTHONDONTWRITEBYTECODE