From: Fernando P. <Fer...@co...> - 2004-12-22 07:23:09
|
Fernando Perez wrote: > hi all, > > A few minor nits with mpl 0.65: > > 1. I just tried to build an rpm for mpl via bdist_rpm, and it unfortunately > fails. The problem is the extra -debuginfo rpm which gets generated in the > process, which then causes the setup.py process to abort. It would be very > nice to be able to use bdist_rpm to cleanly generate RPMs out of the sources, > for handling installation via yum on multiple boxes. OK, here's a quick and dirty fix I found. In distutils/command/bdist_rpm.py, around line 309, use the following: if not self.dry_run: if not self.binary_only: srpms = glob.glob(os.path.join(rpm_dir['SRPMS'], "*.rpm")) #assert len(srpms) == 1, \ # "unexpected number of SRPM files found: %s" % srpms #self.move_file(srpms[0], self.dist_dir) map(lambda f:self.move_file(f,self.dist_dir),srpms) if not self.source_only: rpms = glob.glob(os.path.join(rpm_dir['RPMS'], "*/*.rpm")) #assert len(rpms) == 1, \ # "unexpected number of RPM files found: %s" % rpms #self.move_file(rpms[0], self.dist_dir) map(lambda f:self.move_file(f,self.dist_dir),rpms) I commented out the asserts which cause the operation to fail, and replaced them with a brute-force map call. I'll try to have some form of this change sent upstream to python-dev, b/c that stupid assert causes no end of grief for extension RPMs. I guess this makes it a bit of a real Xmas gift :) Cheers, f |