New submission from Michał Górny: Since 3.5, optimized Python modules for -O and -OO are installed using different names. The Python build system itself seems to been prepared for this as Python itself is built with both .opt-1.pyc and .opt-2.pyc files built. However, distutils at the moment can only install one of them.
Gentoo is relying on 'setup.py install --compile -O2' doing the right thing. We can change the arguments if necessary but calling it twice would require a lot of conditional changes to how we build packages. Of course, not installing both variants is not an option since it causes Python to attempt to write them at runtime later. Could we please get some way to build both .opt-1.pyc and .opt-2.pyc in setup.py install? Either through making -O2 build also -O1 implicitly, or providing an ability to specify multiple optimization levels. Relevant Gentoo bug: https://bugs.gentoo.org/585060 ---------- components: Distutils messages: 267389 nosy: dstufft, eric.araujo, mgorny priority: normal severity: normal status: open title: distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously type: behavior versions: Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27226> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com