The py-compile script supplied by automake doesn't reinvent the wheel correctly, and does not generate opt-2 level scripts with Python 3. Furthermore, it wrongly skips opt-1 for PyPy3.
For the record, I'd really prefer if we merged some fix for this ASAP rather than waited for upstream. This is one of the things where upstreams care much less than Gentoo Python project does.
Ping.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8a9593ce34635069bcff01b564f4233aebd79b0 commit c8a9593ce34635069bcff01b564f4233aebd79b0 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2019-11-03 11:02:30 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2019-11-08 09:47:43 +0000 sys-devel/automake: Fix byte-compiling Python modules on py3.5+ Bug: https://bugs.gentoo.org/699218 Signed-off-by: Michał Górny <mgorny@gentoo.org> Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> sys-devel/automake/automake-1.16.1-r2.ebuild | 113 +++++++++++++++++++++ .../files/automake-1.16.1-py3-compile.patch | 61 +++++++++++ 2 files changed, 174 insertions(+)
Also added to 9999 since upstream is kinda hibernating...
We've had this in Gentoo for ages and it's in upstream git too.