This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 198877 - setup.py bdist_rpm fails with "Installed (but unpackaged) file(s) found"
setup.py bdist_rpm fails with "Installed (but unpackaged) file(s) found"
Status: CLOSED DUPLICATE of bug 236535
Product: Fedora
Classification: Fedora
Component: python (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-14 07:03 EDT by Jan Martinek
Modified: 2009-01-15 17:51 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-01-06 16:23:04 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jan Martinek 2006-07-14 07:03:28 EDT
Description of problem:

setup.py fails to build rpm.

How reproducible:
Always

Steps to Reproduce:
1. Create dir "foo" with these files:

foo.py
setup.py

setup.py contains:
----
#!/usr/bin/env python
from distutils.core import setup

setup(
name='foo',
version='0.1',
py_modules=['foo'],
)
----
contents of file foo.py is not important.

2. from the 'foo' directory run

python setup.py bdist_rpm
  
Actual results:

building of rpm fails with

Checking for unpackaged file(s): /usr/lib/rpm/check-files
/var/tmp/foo-0.1-1-buildroot
error: Installed (but unpackaged) file(s) found:
   /usr/lib/python2.4/site-packages/foo.pyo


Expected results:

The command above should create a rpm package.
Comment 1 Mihai Ibanescu 2006-07-16 22:23:13 EDT
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
--record=INSTALLED_FILES 

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
http://sourceforge.net/tracker/?group_id=5470&atid=105470&func=add

Comment 3 Mads Kiilerich 2008-03-28 05:57:33 EDT
FYI I got this problem on F8 trying to build pyscard-1.6.6 with "./setup.py
build bdist_rpm"

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
guys?
Comment 4 Mads Kiilerich 2009-01-15 17:51:02 EST
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 ***

Note You need to log in before you can comment on or make changes to this bug.