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

This commit is contained in:
Nick Coghlan 2012-05-28 22:34:46 +10:00
parent e1c5087802
commit 4b6045c30f
2 changed files with 5 additions and 1 deletions

View file

@ -190,7 +190,7 @@ def finalize_options(self):
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 @@ def run(self):
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)])