[Distutils] No support for .pyo files
Rene Liebscher
R.Liebscher@gmx.de
Mon May 14 10:54:02 2001
Greg Kochanski wrote:
>
> Python has a -O flag that turns on some compiler
> optimizations. Python then looks for (and produces)
> .pyo files instead of .pyc files.
>
> Distutils doesn't seem to provide any support for this.
> What can be done?
>
By using "python setup.py install -O1" you can tell
distutils to create pyo files.
------------------------------------------------------------------------------
rob@cvs/distutils >python setup.py install --help
...
Options for 'install' command:
...
--compile (-c) compile .py to .pyc [default]
--no-compile don't compile .py files
--optimize (-O) also compile with optimization: -O1 for "python
-O", -O2
for "python -OO", and -O0 to disable [default:
-O0]
...
------------------------------------------------------------------------------
Kind regards
Rene Liebscher