When I use PyInstaller, it builds my modules as .pyc files. But I'd prefer it to run the compilation with -OO to optmize and remove docstrings. Is this possible?
Since pyinstaller
is a Python script, it is sufficient to run it with optimisation activated: e.g.
PYTHONOPTIMIZE=2 pyinstaller script.py
so that during bundling .pyo
files are created instead of .pyc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With