From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040207 Firefox/0.8 Description of problem: Trying to build an rpm for the numarray package http://www.stsci.edu/resources/software_hardware/numarray [testuser@xpc15 ~/numarray-0.9]$ python setup.py bdist_rpm ... Wrote: /home/testuser/numarray-0.9/build/bdist.linux-i686/rpm/SRPMS/numarray-0.9-1.src.rpm Wrote: /home/testuser/numarray-0.9/build/bdist.linux-i686/rpm/RPMS/i386/numarray-0.9-1.i386.rpm Wrote: /home/testuser/numarray-0.9/build/bdist.linux-i686/rpm/RPMS/i386/numarray-debuginfo-0.9-1.i386.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.17559 + umask 022 + cd /home/testuser/numarray-0.9/build/bdist.linux-i686/rpm/BUILD + cd numarray-0.9 + rm -rf /var/tmp/numarray-buildroot + exit 0 Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.17559 + umask 022 + cd /home/testuser/numarray-0.9/build/bdist.linux-i686/rpm/BUILD + rm -rf numarray-0.9 + exit 0 moving build/bdist.linux-i686/rpm/SRPMS/numarray-0.9-1.src.rpm -> dist Traceback (most recent call last): File "setup.py", line 153, in ? main() File "setup.py", line 144, in main setup(**p) File "/usr/src/build/394694-i386/install/usr/lib/python2.3/distutils/core.py", line 149, in setup File "/usr/src/build/394694-i386/install/usr/lib/python2.3/distutils/dist.py", line 907, in run_commands File "/usr/src/build/394694-i386/install/usr/lib/python2.3/distutils/dist.py", line 927, in run_command File "/usr/src/build/394694-i386/install/usr/lib/python2.3/distutils/command/bdist_rpm.py", line 316, in run AssertionError: unexpected number of RPM files found: ['build/bdist.linux-i686/rpm/RPMS/i386/numarray-0.9-1.i386.rpm', 'build/bdist.linux-i686/rpm/RPMS/i386/numarray-debuginfo-0.9-1.i386.rpm'] It looks like python distutils fails as there's a generated debuginfo file. Distutils should be fixed to know about the intended number of rpms. Version-Release number of selected component (if applicable): python-2.3.3-6 How reproducible: Always Steps to Reproduce: 1. Download numarray tar.gz 2. Run python setup.py bdist_rpm 3. Additional info: I think it would be great if numarray was in Fedora!
Have you reported this bug upstream? It is not a packaging bug, is it?
I thought it might have been because of the extra debuginfo files. I'll report it upstream now if you think not.
Okay, I've found a python bug corresponding to this bug. There's a patch to fix the problem, but the bug claims redhat/fedora developers chose not to include the patch. See http://sourceforge.net/tracker/index.php?func=detail&aid=957381&group_id=5470&atid=105470
Ah, cool. Thanks, I'll include the bug in the next python build.
The patch is horrible IMHO. distutils should be fixed to allow for more than one rpm to be built out of one spec file, not worked around the specific debuginfo problem.
I must confess I haven't studied the patch, however: Distutils writes the spec file itself, writes it to build one binary rpm, so it reasonably expects one binary rpm is created. It is redhat-rpm-config what does something unexpected. If rpmbuild creates some random extra rpms, how can distutils know what happened, what they are good for and what to do with them? And there is no generic method of preventing that. Special-casing for known extra rpms it knows what to do with is not so bad idea then.
You are right that distutils creates the spec file (although I wish it offered a way to accept a custom spec file). But the -debuginfo thing is totally driven by rpm macros. rpm macros are very powerful and very confusing too. Anyway, I have a patch that I will submit upstream that hopefully addresses the big FIXME in distutils/command/bdist_rpm.py (and will put it in rawhide for public consideration).
Patched rpms are available at: ftp://people.redhat.com/misa/python/ (until the rawhide build becomes available) Please give them a try and let me know if they work for you.
They seem to fix it for me.
Excellent. The patch was accepted upstream too.
does python-2.3.3-6 contain the patch? I went to the above url to download the patched version, but it has been removed.
Not sure, I would say use python 2.3.4 from rawhide or FC3 test 1. http://download.fedora.redhat.com/pub/fedora/linux/core/test/2.90/i386/os/Fedora/RPMS/