On Tue, Aug 5, 2008 at 10:41 AM, Beth Stetzler <beth.stetzler@xxxxxxxxxxxxx> wrote: > Hello, > > I have made a .spec file to build an RPM that is to install some shell > scripts and Python scripts. The Python scripts are giving BUILD errors. > The errors say that the .pyo and .pyc files are installed but not packaged. > I understand Python compiles these at runtime. I'm hoping someone can > assist with how to fix these problems. I have tested the .py scripts, but I > do not see the .pyc and .pyo files. They are not in the tarball I created. > Would Python have put them in a random location? My Python version is 2.4 > and the library directory site packages is /usr/lib/python2.4/site-packages. > I know of some bandaids for this. 1. Fix your spec file to add the pyc files. Go to your %files directive. 2. Tell RPM to ignore the unpackaged files. Put this at the top of the spec file: %define _unpackaged_files_terminate_build 0 3. Install the package "checkInstall". That will generate an RPM "on the fly" after a make. You will see exactly where all the installed files go. It does not check anything, it does not make a fully legitimate spec file. But it does help you see where all the things get put. 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. pj -- Paul E. Johnson Professor, Political Science 1541 Lilac Lane, Room 504 University of Kansas _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list