aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/modules')
-rw-r--r--mesonbuild/modules/python3.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/mesonbuild/modules/python3.py b/mesonbuild/modules/python3.py
index 9b6e71e..53e28c4 100644
--- a/mesonbuild/modules/python3.py
+++ b/mesonbuild/modules/python3.py
@@ -12,9 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from .. import mesonlib
+import sys
+from .. import mesonlib, dependencies
from . import ExtensionModule
+from mesonbuild.modules import ModuleReturnValue
class Python3Module(ExtensionModule):
def __init__(self):
@@ -39,5 +41,9 @@ class Python3Module(ExtensionModule):
kwargs['name_suffix'] = suffix
return interpreter.func_shared_module(None, args, kwargs)
+ def find_python(self, state, args, kwargs):
+ py3 = dependencies.ExternalProgram('python3', sys.executable, silent=True)
+ return ModuleReturnValue(py3, [py3])
+
def initialize():
return Python3Module()