Description of problem:
setup.py fails to build rpm.
Steps to Reproduce:
1. Create dir "foo" with these files:
from distutils.core import setup
contents of file foo.py is not important.
2. from the 'foo' directory run
python setup.py bdist_rpm
building of rpm fails with
Checking for unpackaged file(s): /usr/lib/rpm/check-files
error: Installed (but unpackaged) file(s) found:
The command above should create a rpm package.
This is a known issue. What happens is, depending on the configuration of rpm,
optimized files may be generated (it is an option in the rpm macros file).
To work around this problem, in the %install section you have to use:
python setup.py install --optimize 1 --root=$RPM_BUILD_ROOT
I am generally using bdist_rpm just to generate the template spec file, since I
cannot control a lot of things that are important from within bdist_rpm. If you
choose to continue to use bdist_rpm, you could create a file called install.spec
containing the above line, and then do:
python setup.py bdist_rpm --install-script install.spec
This should be filed upstream with the python developers; if you want to do that
yourself please use
FYI I got this problem on F8 trying to build pyscard-1.6.6 with "./setup.py
http://www.aczoom.com/cms/forums/blockhosts/no-rpm-builds hinted me to a
workaround that works for me:
echo "%_unpackaged_files_terminate_build 0" >> ~/.rpmmacros
What is the status of this issue? Unresolved disagreement between python and rpm
Ok, we tried to blame upstream, but it popped up again in issue 236535, and this time it seems like we will get it fixed ...
*** This bug has been marked as a duplicate of bug 236535 ***