How to add a python script to an RPM in the right way?

Greg_Swift at Greg_Swift at
Wed Dec 24 15:56:11 UTC 2008

> On Wed, Dec 24, 2008 at 4:49 PM,  <Greg_Swift at> wrote:
> >> I'm trying to add several python scripts to an RPM.
> >> For all of the scripts but one, .pyc and .pyo files are being created.
> >>
> >> For a specific file (every time the same file) the .pyc and .pyo are
> >> sometimes being generated
> >> (i don't really understand why the behavior is not consistent).
> >>
> >> Can anyone know how to handle this issue?
> >
> > could you please provide your spec file?
> >
> > -greg
> >
> I attached the spec file.
> The problem is that sometimes the bytecode files of python (pyc/pyo)
> aren't being created and the RPM creation fails ...
> Thanks for the quick response
> Dotan

Well, the layout of the source tarball is kind of important in this
scenario, but I made the assumption that it looked something like this:

# tar -tjf my-rpm.tar.bz2

Based on that I made adjustments to the spec.  its attached.  I haven't
tested it, but if the tarball is like that there shouldnt be any changes


ps. please don't top post if you can avoid it.
(See attached file: my-rpm.spec)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: my-rpm.spec
Type: application/octet-stream
Size: 1182 bytes
Desc: not available
Url : 

More information about the Rpm-list mailing list