python package: pyo files

Toshio Kuratomi toshio at tiki-lounge.com
Wed Aug 9 16:54:01 UTC 2006


On Wed, 2006-08-09 at 18:38 +0200, Laurent Rineau wrote:
> The guidelines for python packages, at 
> http://fedoraproject.org/wiki/Packaging/Python, explain how to make the .pyo 
> files be uninstalled, if the package is uninstalled.
> 
> Actually, those guidelines are quite ambiguous: can a package ship .pyo files 
> or not?
> 
For a reason.  It's packager's discretion right now.  The .pyo files
have little practical benefit so that's a reason to %ghost them. OTOH
the space savings from %ghost'ing the .pyo's is also small so that's a
reason for just including them and not worrying about the space.  I
personally ghost because every little bit helps when you are a space
limited device.

The only thing what's disallowed is not listing the .pyo's in the %files
section at all.

> Since rpm-build-4.4.1-0.1 (Dec 05 2004), the rpm macro __os_install_post 
> contains /usr/lib/rpm/brp-python-bytecompile, which compiles .py files 
> into .pyc and .pyo.
> 
If someone will remind me of which FC version this was added in I'll add
this to the page:

  As of FCX, rpm automatically compiles to .pyc and .pyo files for you.
As long as you are not going to build your package on versions older
than that you do not need to manually byte compile the files.  You still
need to include the files in your %files section, though.

-Toshio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/fedora-extras-list/attachments/20060809/1b31c36e/attachment.sig>


More information about the fedora-extras-list mailing list