commit: c74caf635cd0485b39e9be44d00a01c740789848 Author: PPed72 <paolo.pedroni <AT> iol <DOT> it> AuthorDate: Fri Jul 6 13:18:35 2018 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Tue Jul 10 21:15:22 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c74caf63
dev-python/slimit: revbump to silence warning on module import Closes: https://bugs.gentoo.org/660510 Closes: https://github.com/gentoo/gentoo/pull/9068 Package-Manager: Portage-2.3.40, Repoman-2.3.9 .../slimit/{slimit-0.8.1.ebuild => slimit-0.8.1-r1.ebuild} | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/dev-python/slimit/slimit-0.8.1.ebuild b/dev-python/slimit/slimit-0.8.1-r1.ebuild similarity index 67% rename from dev-python/slimit/slimit-0.8.1.ebuild rename to dev-python/slimit/slimit-0.8.1-r1.ebuild index 6eb5f29a614..b4561d3f8de 100644 --- a/dev-python/slimit/slimit-0.8.1.ebuild +++ b/dev-python/slimit/slimit-0.8.1-r1.ebuild @@ -15,7 +15,7 @@ SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="test" -RDEPEND="dev-python/ply[${PYTHON_USEDEP}] +RDEPEND="dev-python/ply:=[${PYTHON_USEDEP}] dev-python/setuptools[${PYTHON_USEDEP}]" DEPEND="${RDEPEND} test? ( @@ -25,6 +25,17 @@ DEPEND="${RDEPEND} PATCHES=( "${FILESDIR}/${P}-fix-python3.patch" ) +python_compile() { + distutils-r1_python_compile + + rm "${BUILD_DIR}"/lib/slimit/*tab.py || die + + # Regenerate yacctab.py and lextab.py files to avoid warnings whenever + # the module is imported. See https://github.com/rspivak/slimit/issues/97 + # for details + "${EPYTHON}" -B -c 'import slimit;slimit.minify("")' || die +} + python_test() { esetup.py pytest --addopts "${BUILD_DIR}" || die "Testing failed with ${EPYTHON}" }
