summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2012-05-28 22:34:46 +1000
committerNick Coghlan <ncoghlan@gmail.com>2012-05-28 22:34:46 +1000
commit4b6045c30fb47a89cd32ebedc2b8d2603cd72e33 (patch)
tree950f8f8e3534b1af750ae7696a4aeed97b9cb859
parente1c5087802428133e7b45228fa22be8d3f2d463c (diff)
downloadcpython-git-4b6045c30fb47a89cd32ebedc2b8d2603cd72e33.tar.gz
Issue #14443: Tell rpmbuild to use the correct version of Python
-rw-r--r--Lib/distutils/command/bdist_rpm.py3
-rw-r--r--Misc/NEWS3
2 files changed, 5 insertions, 1 deletions
diff --git a/Lib/distutils/command/bdist_rpm.py b/Lib/distutils/command/bdist_rpm.py
index 357eaa575e..401bc41872 100644
--- a/Lib/distutils/command/bdist_rpm.py
+++ b/Lib/distutils/command/bdist_rpm.py
@@ -190,7 +190,7 @@ class bdist_rpm(Command):
if self.fix_python:
self.python = sys.executable
else:
- self.python = "python"
+ self.python = "python3"
elif self.fix_python:
raise DistutilsOptionError(
"--python and --fix-python are mutually exclusive options")
@@ -320,6 +320,7 @@ class bdist_rpm(Command):
rpm_cmd.append('-bb')
else:
rpm_cmd.append('-ba')
+ rpm_cmd.extend(['--define', '__python %s' % self.python])
if self.rpm3_mode:
rpm_cmd.extend(['--define',
'_topdir %s' % os.path.abspath(self.rpm_base)])
diff --git a/Misc/NEWS b/Misc/NEWS
index 2b457232f2..386d103ad6 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -67,6 +67,9 @@ Core and Builtins
Library
-------
+- Issue #14443: Tell rpmbuild to use the correct version of Python in
+ bdist_rpm. Initial patch by Ross Lagerwall.
+
- Issue14929: Stop Idle 3.x from closing on Unicode decode errors when grepping.
Patch by Roger Serwy.