summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command/bdist_rpm.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2005-03-23 18:54:36 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2005-03-23 18:54:36 (GMT)
commit98da562600def4f3e2054ec52acff32f397aa096 (patch)
treee4e9d11f64ec766ddd8100995faa903a3c2f3ea7 /Lib/distutils/command/bdist_rpm.py
parentc8734a72576845731c145b96f6825126605976cc (diff)
downloadcpython-98da562600def4f3e2054ec52acff32f397aa096.zip
cpython-98da562600def4f3e2054ec52acff32f397aa096.tar.gz
cpython-98da562600def4f3e2054ec52acff32f397aa096.tar.bz2
Make dist_files a triple, with the Python target version included,
so that bdist_wininst can specify 'any'.
Diffstat (limited to 'Lib/distutils/command/bdist_rpm.py')
-rw-r--r--Lib/distutils/command/bdist_rpm.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/Lib/distutils/command/bdist_rpm.py b/Lib/distutils/command/bdist_rpm.py
index 09bfa43..c7b94e8 100644
--- a/Lib/distutils/command/bdist_rpm.py
+++ b/Lib/distutils/command/bdist_rpm.py
@@ -15,6 +15,7 @@ from distutils.debug import DEBUG
from distutils.util import get_platform
from distutils.file_util import write_file
from distutils.errors import *
+from distutils.sysconfig import get_python_version
from distutils import log
class bdist_rpm (Command):
@@ -346,6 +347,10 @@ class bdist_rpm (Command):
srpms = glob.glob(os.path.join(rpm_dir['SRPMS'], "*.rpm"))
assert len(srpms) == 1, \
"unexpected number of SRPM files found: %s" % srpms
+ dist_file = ('bdist_rpm', '',
+ os.path.join(self.dist_dir,
+ os.path.basename(srpms[0])))
+ self.distribution.dist_files.append(dist_file)
self.move_file(srpms[0], self.dist_dir)
if not self.source_only:
@@ -356,9 +361,15 @@ class bdist_rpm (Command):
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.distribution.dist_files.append(dist_file)
self.move_file(rpms[0], self.dist_dir)
- self.distribution.dist_files.append(('bdist_rpm', rpms[0]))
if debuginfo:
+ dist_file = ('bdist_rpm', get_python_version(),
+ os.path.join(self.dist_dir,
+ os.path.basename(debuginfo[0])))
self.move_file(debuginfo[0], self.dist_dir)
# run()