Comment 0 for bug 1856242

Revision history for this message
Omer Akram (om26er) wrote :

Currently snapcraft bytecompiles .py files as part of the Python plugin, this is done to fasten startup time of snaps. Doing that increases the size of the snap due to no reason.

The snap should only ship pyc file and remove .py files.

How to achieve that ?

1. pip install --no-compile
2. python3 -m compileall -b
3. find . -name '*.py' -type f -exec rm {} \;