Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4b6045c

Browse files
committed
Issue #14443: Tell rpmbuild to use the correct version of Python
1 parent e1c5087 commit 4b6045c

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

Lib/distutils/command/bdist_rpm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def finalize_options(self):
190190
if self.fix_python:
191191
self.python = sys.executable
192192
else:
193-
self.python = "python"
193+
self.python = "python3"
194194
elif self.fix_python:
195195
raise DistutilsOptionError(
196196
"--python and --fix-python are mutually exclusive options")
@@ -320,6 +320,7 @@ def run(self):
320320
rpm_cmd.append('-bb')
321321
else:
322322
rpm_cmd.append('-ba')
323+
rpm_cmd.extend(['--define', '__python %s' % self.python])
323324
if self.rpm3_mode:
324325
rpm_cmd.extend(['--define',
325326
'_topdir %s' % os.path.abspath(self.rpm_base)])

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ Core and Builtins
6767
Library
6868
-------
6969

70+
- Issue #14443: Tell rpmbuild to use the correct version of Python in
71+
bdist_rpm. Initial patch by Ross Lagerwall.
72+
7073
- Issue14929: Stop Idle 3.x from closing on Unicode decode errors when grepping.
7174
Patch by Roger Serwy.
7275

0 commit comments

Comments
 (0)