Commit 4b6045c3 authored by Nick Coghlan's avatar Nick Coghlan

Issue #14443: Tell rpmbuild to use the correct version of Python

parent e1c50878
...@@ -190,7 +190,7 @@ class bdist_rpm(Command): ...@@ -190,7 +190,7 @@ class bdist_rpm(Command):
if self.fix_python: if self.fix_python:
self.python = sys.executable self.python = sys.executable
else: else:
self.python = "python" self.python = "python3"
elif self.fix_python: elif self.fix_python:
raise DistutilsOptionError( raise DistutilsOptionError(
"--python and --fix-python are mutually exclusive options") "--python and --fix-python are mutually exclusive options")
...@@ -320,6 +320,7 @@ class bdist_rpm(Command): ...@@ -320,6 +320,7 @@ class bdist_rpm(Command):
rpm_cmd.append('-bb') rpm_cmd.append('-bb')
else: else:
rpm_cmd.append('-ba') rpm_cmd.append('-ba')
rpm_cmd.extend(['--define', '__python %s' % self.python])
if self.rpm3_mode: if self.rpm3_mode:
rpm_cmd.extend(['--define', rpm_cmd.extend(['--define',
'_topdir %s' % os.path.abspath(self.rpm_base)]) '_topdir %s' % os.path.abspath(self.rpm_base)])
......
...@@ -67,6 +67,9 @@ Core and Builtins ...@@ -67,6 +67,9 @@ Core and Builtins
Library 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. - Issue14929: Stop Idle 3.x from closing on Unicode decode errors when grepping.
Patch by Roger Serwy. Patch by Roger Serwy.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment