* * This package installs one or more Python modules that are not byte-compiled. * The following files are missing: * * /usr/lib/pypy2.7/site-packages/importlib_resources/_py3.pyc * /usr/lib64/python2.7/site-packages/importlib_resources/_py3.pyc * /usr/lib64/python2.7/site-packages/importlib_resources/_py3.pyo * * Please either fix the upstream build system to byte-compile Python modules * correctly, or call python_optimize after installing them. For more * information, see: * https://wiki.gentoo.org/wiki/Project:Python/Byte_compiling
Here's what happens when I try to byte-compile manually: $ python2.7 setup.py build $ python2.7 -m compileall build/ Listing build/ ... Listing build/lib ... Listing build/lib/importlib_resources ... Compiling build/lib/importlib_resources/__init__.py ... Compiling build/lib/importlib_resources/_compat.py ... Compiling build/lib/importlib_resources/_py2.py ... Compiling build/lib/importlib_resources/_py3.py ... File "build/lib/importlib_resources/_py3.py", line 25 def _get_package(package) -> ModuleType: ^ SyntaxError: invalid syntax Given that Python 2.7's compileall is unable to process _py3.py, I am not sure this can be considered a bug of the dev-python/importlib_resources ebuild.
@mgorny: Can you please change the assignee for this bug? It just keeps getting older, and I am not the right person.
Strip extraneous files in python_compile(). See latest jinja version on how to do it.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f865890c6c177bf9fc0f2143af671a4a602e6be9 commit f865890c6c177bf9fc0f2143af671a4a602e6be9 Author: Ralph Seichter <github@seichter.de> AuthorDate: 2020-02-23 14:13:31 +0000 Commit: Louis Sautier <sbraz@gentoo.org> CommitDate: 2020-02-27 11:31:07 +0000 dev-python/importlib_resources: fix byte-compilation, misc. changes * Resolve QA warnings regarding Python byte-compilation. * Use distutils_enable_* functions for doc and tests. Closes: https://bugs.gentoo.org/703104 Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Ralph Seichter <gentoo@seichter.de> Closes: https://github.com/gentoo/gentoo/pull/14753 Signed-off-by: Louis Sautier <sbraz@gentoo.org> .../importlib_resources-1.0.2-r2.ebuild | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+)