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-22 13:28:13 +0000
commit6d3d01d4f0ada188cfa9238a244d8bdd0186fbed (patch)
tree196b4313834fb13dc9363c8561f6da549a14100e
parente137bd71d7e876b43a7d7c25d36677492df00a56 (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 999206425..5277d17d1 100644
--- a/examples/scriptableapplication/CMakeLists.txt
+++ b/examples/scriptableapplication/CMakeLists.txt
@@ -16,7 +16,7 @@ find_package(Qt5 5.12 REQUIRED COMPONENTS Core Gui 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}")