mirror of https://github.com/python/cpython.git
minor cleanup
This commit is contained in:
parent
712f07082d
commit
c6699b7dc4
|
@ -348,31 +348,30 @@ def run (self):
|
||||||
assert len(srpms) == 1, \
|
assert len(srpms) == 1, \
|
||||||
"unexpected number of SRPM files found: %s" % srpms
|
"unexpected number of SRPM files found: %s" % srpms
|
||||||
dist_file = ('bdist_rpm', 'any',
|
dist_file = ('bdist_rpm', 'any',
|
||||||
os.path.join(self.dist_dir,
|
self._dist_path(srpms[0]))
|
||||||
os.path.basename(srpms[0])))
|
|
||||||
self.distribution.dist_files.append(dist_file)
|
self.distribution.dist_files.append(dist_file)
|
||||||
self.move_file(srpms[0], self.dist_dir)
|
self.move_file(srpms[0], self.dist_dir)
|
||||||
|
|
||||||
if not self.source_only:
|
if not self.source_only:
|
||||||
rpms = glob.glob(os.path.join(rpm_dir['RPMS'], "*/*.rpm"))
|
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"))
|
"*/*debuginfo*.rpm"))
|
||||||
if debuginfo:
|
if debuginfo:
|
||||||
rpms.remove(debuginfo[0])
|
rpms.remove(debuginfo[0])
|
||||||
assert len(rpms) == 1, \
|
assert len(rpms) == 1, \
|
||||||
"unexpected number of RPM files found: %s" % rpms
|
"unexpected number of RPM files found: %s" % rpms
|
||||||
dist_file = ('bdist_rpm', get_python_version(),
|
dist_file = ('bdist_rpm', get_python_version(),
|
||||||
os.path.join(self.dist_dir,
|
self._dist_path(rpms[0])
|
||||||
os.path.basename(rpms[0])))
|
|
||||||
self.distribution.dist_files.append(dist_file)
|
self.distribution.dist_files.append(dist_file)
|
||||||
self.move_file(rpms[0], self.dist_dir)
|
self.move_file(rpms[0], self.dist_dir)
|
||||||
if debuginfo:
|
if debuginfo:
|
||||||
dist_file = ('bdist_rpm', get_python_version(),
|
dist_file = ('bdist_rpm', get_python_version(),
|
||||||
os.path.join(self.dist_dir,
|
self._dist_path(debuginfo[0])
|
||||||
os.path.basename(debuginfo[0])))
|
|
||||||
self.move_file(debuginfo[0], self.dist_dir)
|
self.move_file(debuginfo[0], self.dist_dir)
|
||||||
# run()
|
# run()
|
||||||
|
|
||||||
|
def _dist_path(self, path):
|
||||||
|
return os.path.join(self.dist_dir, os.path.basename(path))
|
||||||
|
|
||||||
def _make_spec_file(self):
|
def _make_spec_file(self):
|
||||||
"""Generate the text of an RPM spec file and return it as a
|
"""Generate the text of an RPM spec file and return it as a
|
||||||
|
|
Loading…
Reference in New Issue