Packaging Guidelines change for python .pyo files

Toshio Kuratomi toshio at tiki-lounge.com
Fri Aug 11 00:37:36 UTC 2006


Greetings All,

In the past the Packaging Guidelines have recommended packagers of
python files include the .py and .pyc files directly in the package and
%ghost the .pyo files.  In a recent discussion on fedora-extras-list[1]_
two problems were found with this.

1) When a .pyo file is not included on the filesystem and a user runs
python -O [APP] SELinux will log an AVC Denial into audit.log.  From the
discussion it seems SELinux rules cannot be adapted to not log this as
expected behaviour without also filtering out other behaviour that may
not be so benign.

2) If a system administrator runs a python application at the second
optimization level (python -OO [APP]) they will create .pyo files that
do not have docstrings.  Certain applications might break when this
happens.  Rerunning python at the first optimization level won't
overwrite the .pyo file so the application would remain broken until the
pyos were manually removed.

To solve this, the recommendations for Python Packages are being updated
to include .pyos directly and not attempt to %ghost them.

[1]_:
https://www.redhat.com/archives/fedora-extras-list/2006-August/msg00208.html

This message is both to inform packagers of guidelines changes that they
should follow in the future and to allow for discussion if someone knows
of a reason this change is not desirable.

Thank you,
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-maintainers/attachments/20060810/ded4d4ca/attachment.sig>


More information about the Fedora-maintainers mailing list