[Python-checkins] python/dist/src/Lib/distutils/command bdist_rpm.py, 1.49, 1.50

fdrake at users.sourceforge.net fdrake at users.sourceforge.net
Thu Mar 24 08:00:07 CET 2005


Update of /cvsroot/python/python/dist/src/Lib/distutils/command
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10770/Lib/distutils/command

Modified Files:
	bdist_rpm.py 
Log Message:
minor cleanup

Index: bdist_rpm.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/bdist_rpm.py,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- bdist_rpm.py	23 Mar 2005 22:16:22 -0000	1.49
+++ bdist_rpm.py	24 Mar 2005 07:00:05 -0000	1.50
@@ -348,31 +348,30 @@
                 assert len(srpms) == 1, \
                        "unexpected number of SRPM files found: %s" % srpms
                 dist_file = ('bdist_rpm', 'any',
-                             os.path.join(self.dist_dir,
-                                          os.path.basename(srpms[0])))
+                             self._dist_path(srpms[0]))
                 self.distribution.dist_files.append(dist_file)
                 self.move_file(srpms[0], self.dist_dir)
 
             if not self.source_only:
                 rpms = glob.glob(os.path.join(rpm_dir['RPMS'], "*/*.rpm"))
-                debuginfo = glob.glob(os.path.join(rpm_dir['RPMS'], \
+                debuginfo = glob.glob(os.path.join(rpm_dir['RPMS'],
                                                    "*/*debuginfo*.rpm"))
                 if debuginfo:
                     rpms.remove(debuginfo[0])
                 assert len(rpms) == 1, \
                        "unexpected number of RPM files found: %s" % rpms
                 dist_file = ('bdist_rpm', get_python_version(),
-                             os.path.join(self.dist_dir,
-                                          os.path.basename(rpms[0])))
+                             self._dist_path(rpms[0])
                 self.distribution.dist_files.append(dist_file)
                 self.move_file(rpms[0], self.dist_dir)
                 if debuginfo:
                     dist_file = ('bdist_rpm', get_python_version(),
-                                 os.path.join(self.dist_dir,
-                                              os.path.basename(debuginfo[0])))
+                                 self._dist_path(debuginfo[0])
                     self.move_file(debuginfo[0], self.dist_dir)
     # run()
 
+    def _dist_path(self, path):
+        return os.path.join(self.dist_dir, os.path.basename(path))
 
     def _make_spec_file(self):
         """Generate the text of an RPM spec file and return it as a



More information about the Python-checkins mailing list