bpo-44097: add --enable-pyc-build option to the configure script by pxinwr · Pull Request #23920 · python/cpython
Conversation
Currently when you build and install Python out of source, unoptimized .pyc files and 2 types of optimized .pyc files(.opt-1.pyc and *.opt-2.pyc) are all compiled out and installed. So to reduce package size and build and installation time, we should provide options in configure to disable them.
pxinwr
changed the title
bpo-31904: add --enable-pyc-build --enable-opt1-pyc-build and --enable-opt2-pyc-build option for configure
bpo-31904: add --enable-pyc-build option to the configure script
@pxinwr Please, don't push force, it's not necessary. Thank you
This PR really should have its own build enhancement BPO issue as it isn't specific to the vxworks one. Can you file a new bug and update the issue title to point to it?
I do think this makes sense, though some discussion over what the name of the configure flag should be and the wording of its descriptive text makes sense (probably better do settle on that in the bug).
pxinwr
changed the title
bpo-31904: add --enable-pyc-build option to the configure script
bpo-44097: add --enable-pyc-build option to the configure script
@gpshead Thanks for your comments. I've filed a new bug# 44097 for this issue. For the name and description text, hopes someone can help to polish.
I'm -1 on complicating configure and Makefile. You could delete unwanted variants with find -name '*.opt-2.pyc' -delete after installation.
pxinwr
mannequin
mentioned this pull request
Sorry for the delay.
Nowadays compileall all levels at once, and it should be a bit easier to limit the opt levels it produces. See the issue.
I don't think we can use the changes in this PR, so I'll close it.