[Python-talk] building rpms using the distutils package
Lloyd Kvam
python at venix.com
Thu Apr 3 11:05:59 EDT 2008
I tried to make an RPM for the demjson module. The bug report is here:
https://bugzilla.redhat.com/show_bug.cgi?id=440354
It was a duplicate of this bug report here:
https://bugzilla.redhat.com/show_bug.cgi?id=236535
There is a fairly long commentary. My quick summary:
Python can be run with a -O (optimize) parameter. This can
result in the creation of .pyo files. Normal user accounts will
not have the permissions to create the .pyo files in system
directories and SELINUX is likely to complain. The
redhat-rpm-config package forces the creation of the .pyo file
as part of the process of building the RPM. However, the SPEC
file that distutils creates does not mention the .pyo file. So
the final check refuses to build the rpm because there is an
extra file that's not properly listed.
comment #20 near the bottom of bug 236535 shows the simple
addition to bdist_rpm.py that will produce a SPEC file that
includes the .pyo.
I'm not sure why this patch is not part of the normal fedora Python
package. That patch worked for me.
--
Lloyd Kvam
Venix Corp
DLSLUG/GNHLUG library
http://www.librarything.com/catalog/dlslug
http://www.librarything.com/profile/dlslug
http://www.librarything.com/rsshtml/recent/dlslug
More information about the Python-talk
mailing list