Python package packaging question

Mihai Ibanescu misa at redhat.com
Mon Feb 2 21:18:09 UTC 2004


On Mon, 2 Feb 2004, Toshio wrote:

> Hi all,
> 
> What is the standard for including byte-compiled python scripts in
> packages?  Say I have
> /usr/lib/python2.2/site-packages/foo.py
> which can byte-compile to foo.pyc (byte compiled) and foo.pyo (optimized
> byte-compiled.  At the moment "optimized" vs normal byte-compiled just
> removes assert statements.)
> 
> I want to include the foo.py script so everyone can see how it works.
> Do I also want to include the byte compiled versions to reduce startup
> time?  Do I want to include the pyc or pyo file?

Definitely.

> I notice that the FC1 python2.2 seems to install all three files which
> seems a waste of space....

It may seem like it. .pyc and .pyo files are there for performance 
reasons. .py files are there, because debugging would be a nightmare 
otherwise.

Cheers,
Misa





More information about the fedora-devel-list mailing list