Need to swap out "python_foreach_impl ..." -> a call to e.g. distutils-r1_src_install and then define the python_compile() phase. https://github.com/gentoo/gentoo/pull/25822 has some discussion for it, but it's to fit better with eclass assumptions.
Ping.