Changed code to use detected executables rather than hardcoding sys.executable.

pull/2498/head
Jussi Pakkanen 7 years ago
parent a437cd1955
commit 9d67e5030b
  1. 9
      mesonbuild/mesonlib.py
  2. 2
      mesonbuild/modules/python3.py

@ -22,6 +22,15 @@ import collections
from glob import glob
if sys.executable.endswith('meson.exe'):
# In Windows and using the MSI installed executable.
meson_command = [sys.executable]
python_command = [sys.executable, 'runpython']
else:
meson_command = [sys.executable, os.path.join(os.path.split(__file__)[0], '..', 'meson.py')]
python_command = [sys.executable]
# Put this in objects that should not get dumped to pickle files
# by accident.
import threading

@ -52,7 +52,7 @@ class Python3Module(ExtensionModule):
@noKwargs
def find_python(self, state, args, kwargs):
py3 = dependencies.ExternalProgram('python3', sys.executable, silent=True)
py3 = dependencies.ExternalProgram('python3', mesonlib.python_command, silent=True)
return ModuleReturnValue(py3, [py3])
@noKwargs

Loading…
Cancel
Save