python3.2+ compiled files

Jacek Konieczny jajcus at
Sun Apr 3 15:04:19 CEST 2011

On Sun, Apr 03, 2011 at 02:38:49PM +0200, Patryk Zawadzki wrote:
> Except in Python you can execute/import .py files just fine. If the
> program is not closed source, .pyc/.pyo/__pycache__ are just an
> optimization detail. We could very well create them in %post.

That is a very bad idea. Bad things will happen if the package is
removed and *.py[o] stays (the module will still be visible to Python).
Best way to make sure 'compiled' files are gone when the package is gone
is to include them in the package.

Just a reminder: not including 'compiled' files in the package at all
would be even worse: those would be generated (and stay forever) when
root runs the code and would not when other user does. 


More information about the pld-devel-en mailing list