This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mgorny
Recipients dstufft, eric.araujo, mgorny
Date 2016-06-05.06:03:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1465106608.99.0.622112847685.issue27226@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2016-06-05 06:03:29mgornysetrecipients: + mgorny, eric.araujo, dstufft
2016-06-05 06:03:28mgornysetmessageid: <1465106608.99.0.622112847685.issue27226@psf.upfronthosting.co.za>
2016-06-05 06:03:28mgornylinkissue27226 messages
2016-06-05 06:03:28mgornycreate