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/slimit/
Date: Tue, 10 Jul 2018 21:15:31
Message-Id: 1531257322.c74caf635cd0485b39e9be44d00a01c740789848.mgorny@gentoo
1 commit: c74caf635cd0485b39e9be44d00a01c740789848
2 Author: PPed72 <paolo.pedroni <AT> iol <DOT> it>
3 AuthorDate: Fri Jul 6 13:18:35 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 10 21:15:22 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c74caf63
7
8 dev-python/slimit: revbump to silence warning on module import
9
10 Closes: https://bugs.gentoo.org/660510
11 Closes: https://github.com/gentoo/gentoo/pull/9068
12 Package-Manager: Portage-2.3.40, Repoman-2.3.9
13
14 .../slimit/{slimit-0.8.1.ebuild => slimit-0.8.1-r1.ebuild} | 13 ++++++++++++-
15 1 file changed, 12 insertions(+), 1 deletion(-)
16
17 diff --git a/dev-python/slimit/slimit-0.8.1.ebuild b/dev-python/slimit/slimit-0.8.1-r1.ebuild
18 similarity index 67%
19 rename from dev-python/slimit/slimit-0.8.1.ebuild
20 rename to dev-python/slimit/slimit-0.8.1-r1.ebuild
21 index 6eb5f29a614..b4561d3f8de 100644
22 --- a/dev-python/slimit/slimit-0.8.1.ebuild
23 +++ b/dev-python/slimit/slimit-0.8.1-r1.ebuild
24 @@ -15,7 +15,7 @@ SLOT="0"
25 KEYWORDS="~amd64 ~x86"
26 IUSE="test"
27
28 -RDEPEND="dev-python/ply[${PYTHON_USEDEP}]
29 +RDEPEND="dev-python/ply:=[${PYTHON_USEDEP}]
30 dev-python/setuptools[${PYTHON_USEDEP}]"
31 DEPEND="${RDEPEND}
32 test? (
33 @@ -25,6 +25,17 @@ DEPEND="${RDEPEND}
34
35 PATCHES=( "${FILESDIR}/${P}-fix-python3.patch" )
36
37 +python_compile() {
38 + distutils-r1_python_compile
39 +
40 + rm "${BUILD_DIR}"/lib/slimit/*tab.py || die
41 +
42 + # Regenerate yacctab.py and lextab.py files to avoid warnings whenever
43 + # the module is imported. See https://github.com/rspivak/slimit/issues/97
44 + # for details
45 + "${EPYTHON}" -B -c 'import slimit;slimit.minify("")' || die
46 +}
47 +
48 python_test() {
49 esetup.py pytest --addopts "${BUILD_DIR}" || die "Testing failed with ${EPYTHON}"
50 }