User:Allan/Python Packaging Policy

From ArchWiki

This page is to collect ideas for a packaging policy to deal with compiled python files (.pyc, .pyo).

Other Distro's Policies

How we should deal with this

Ideas welcome...

cwt comment

AFAIK, the .pyc/.pyo file is architecture independent (at least for now). So I think we should put this line

python setup.py install --root=$pkgdir/ --optimize=1

instead of

python setup.py install --root=$pkgdir/

to provide pseudo compile byte-code and the optimized byte-code with the package.