Re: RPM Build Problem: installed but unpackaged .pyo and .pyc files

Matthew Miller <[email protected]> Tue, 5 Aug 2008 15:00:04 -0400
Newsgroups gmane.linux.redhat.rpm.general
Message-ID <[email protected]>
On Tue, Aug 05, 2008 at 01:42:51PM -0500, Paul Johnson wrote:
> A deeper approach is to fix the install.  My python knowledge is
> limited, but I *believe* that the you might be smart to keep the pyc
> files because they will execute faster than the py versions.  Python
> won't re-generate the pyc file if it is current, ie based on same py
> file as you have.    I don't see pyo files resulting from "make
> install".  I do see them after make.
> Other poster is correct. You should get some SRPM files from python
> programs and study their spec files.

It's not necesaarily a general solution for all distributions, but here's
the Fedora guidelines for this:

<http://fedoraproject.org/wiki/Packaging/Python#Byte_Compiled_Files>

In a nutshell, include 'em in %files.

-- 
Matthew Miller           [email protected]          <http://mattdm.org/>
Boston University Linux      ------>              <http://linux.bu.edu/>