aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2021-11-19 10:35:27 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-11-23 11:16:36 +0000
commit2901cd1b31f7542892db4bbcac1d91483f86642d (patch)
tree019d7ffbd6599a516829cd5c8ad3c98fd7f60585
parent3791ce384b4af832d1aefe7b496f10901c546f20 (diff)
scriptable: make it work by default on macOS, too
Some platforms like Homebrew's macOS name the Python interpreter "python3", while others use "python" as the default name. In any case, it is correct to use the Python 3 version as default, because Python 2 is deprecated. The default now tries "python3" first and falls back to "python". Task-number: PYSIDE-1710 Change-Id: I8850b2c157d219e7785177f41425dca1c2144f99 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit a77c08a6512b079175d08ae1732b9f65c79b687f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--examples/scriptableapplication/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/scriptableapplication/CMakeLists.txt b/examples/scriptableapplication/CMakeLists.txt
index 63b70c5da..8cb58a330 100644
--- a/examples/scriptableapplication/CMakeLists.txt
+++ b/examples/scriptableapplication/CMakeLists.txt
@@ -18,7 +18,7 @@ find_package(Qt6 COMPONENTS Widgets)
# Use provided python interpreter if given.
if(NOT python_interpreter)
- find_program(python_interpreter "python")
+ find_program(python_interpreter NAMES python3 python)
endif()
message(STATUS "Using python interpreter: ${python_interpreter}")