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

Greg_Swift at aotx.uscourts.gov Greg_Swift at aotx.uscourts.gov
Wed Dec 24 15:56:11 UTC 2008


> On Wed, Dec 24, 2008 at 4:49 PM,  <Greg_Swift at aotx.uscourts.gov> 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
my-rpm/
my-rpm/script1.py
my-rpm/script2.py
my-rpm/script3.py

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
necessary.

-greg

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 : http://lists.rpm.org/pipermail/rpm-list/attachments/20081224/20bccdc6/attachment.obj 


More information about the Rpm-list mailing list