2018-03-27 19:48:07 +00:00
|
|
|
|
|
|
|
Ensure that python scripts executed during the build use the same python
|
|
|
|
interpreter specified as $PYTHON by the spec file.
|
|
|
|
|
|
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=1552079
|
|
|
|
|
2018-03-27 18:07:50 +00:00
|
|
|
--- subversion-1.9.7/build/generator/gen_make.py.pybinary
|
|
|
|
+++ subversion-1.9.7/build/generator/gen_make.py
|
|
|
|
@@ -507,7 +507,7 @@
|
|
|
|
standalone.write('top_srcdir = .\n')
|
|
|
|
standalone.write('top_builddir = .\n')
|
|
|
|
standalone.write('SWIG = swig\n')
|
|
|
|
- standalone.write('PYTHON = python\n')
|
|
|
|
+ standalone.write('PYTHON = ' + sys.executable + '\n')
|
|
|
|
standalone.write('\n')
|
|
|
|
standalone.write(open("build-outputs.mk","r").read())
|
|
|
|
standalone.close()
|
2018-03-27 19:48:07 +00:00
|
|
|
--- subversion-1.9.7/subversion/tests/cmdline/svntest/main.py.pybinary
|
|
|
|
+++ subversion-1.9.7/subversion/tests/cmdline/svntest/main.py
|
|
|
|
@@ -126,7 +126,7 @@
|
|
|
|
if windows:
|
|
|
|
svneditor_script = os.path.join(sys.path[0], 'svneditor.bat')
|
|
|
|
else:
|
|
|
|
- svneditor_script = os.path.join(sys.path[0], 'svneditor.py')
|
|
|
|
+ svneditor_script = sys.executable + ' ' + os.path.join(sys.path[0], 'svneditor.py')
|
|
|
|
|
|
|
|
# Username and password used by the working copies
|
|
|
|
wc_author = 'jrandom'
|
|
|
|
@@ -410,9 +410,9 @@
|
|
|
|
should be passed to wait_on_pipe."""
|
|
|
|
command = [str(x) for x in command]
|
|
|
|
|
|
|
|
- # On Windows subprocess.Popen() won't accept a Python script as
|
|
|
|
- # a valid program to execute, rather it wants the Python executable.
|
|
|
|
- if (sys.platform == 'win32') and (command[0].endswith('.py')):
|
|
|
|
+ # Always run python scripts under the same Python executable as used
|
|
|
|
+ # for the test suite.
|
|
|
|
+ if command[0].endswith('.py'):
|
|
|
|
command.insert(0, sys.executable)
|
|
|
|
|
|
|
|
command_string = command[0] + ' ' + ' '.join(map(_quote_arg, command[1:]))
|