forked from qt-creator/qt-creator
qbs: fix installing doc dependenices on macOS and Windows
python still aliases to python 2.7 on macOS, so we need a smarter way to find python3. Change-Id: I229d8c1e124fb599119991b44c0f6d88d39b1684 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
committed by
Ivan Komissarov
parent
4b33979bcd
commit
962918629b
10
.github/workflows/build_cmake.yml
vendored
10
.github/workflows/build_cmake.yml
vendored
@@ -330,8 +330,12 @@ jobs:
|
|||||||
message(FATAL_ERROR "Failed to install dependencies")
|
message(FATAL_ERROR "Failed to install dependencies")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
find_package(Python3 REQUIRED COMPONENTS Interpreter)
|
||||||
|
# hack to replace 32-bit python found by this script with 64-bit one
|
||||||
|
# required for linking qtcreatorcdbext
|
||||||
|
string(REPLACE "x86" "x64" Python3_EXECUTABLE "${Python3_EXECUTABLE}")
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND python -m pip install --user beautifulsoup4 lxml
|
COMMAND ${Python3_EXECUTABLE} -m pip install --user beautifulsoup4 lxml
|
||||||
RESULT_VARIABLE result
|
RESULT_VARIABLE result
|
||||||
)
|
)
|
||||||
if (NOT result EQUAL 0)
|
if (NOT result EQUAL 0)
|
||||||
@@ -394,6 +398,9 @@ jobs:
|
|||||||
set(ELFUTILS_OPTION)
|
set(ELFUTILS_OPTION)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
find_package(Python3 REQUIRED COMPONENTS Interpreter)
|
||||||
|
string(REPLACE "x86" "x64" Python3_EXECUTABLE "${Python3_EXECUTABLE}")
|
||||||
|
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND python
|
COMMAND python
|
||||||
-u
|
-u
|
||||||
@@ -403,6 +410,7 @@ jobs:
|
|||||||
--build build
|
--build build
|
||||||
--qt-path "${{ steps.qt.outputs.qt_dir }}"
|
--qt-path "${{ steps.qt.outputs.qt_dir }}"
|
||||||
--llvm-path "${{ steps.libclang.outputs.libclang_dir }}"
|
--llvm-path "${{ steps.libclang.outputs.libclang_dir }}"
|
||||||
|
--python3 "${Python3_EXECUTABLE}"
|
||||||
--with-tests
|
--with-tests
|
||||||
${CDB_OPTION}
|
${CDB_OPTION}
|
||||||
${ELFUTILS_OPTION}
|
${ELFUTILS_OPTION}
|
||||||
|
@@ -132,6 +132,7 @@ def build_qtcreator(args, paths):
|
|||||||
|
|
||||||
if args.python3:
|
if args.python3:
|
||||||
cmake_args += ['-DPYTHON_EXECUTABLE=' + args.python3]
|
cmake_args += ['-DPYTHON_EXECUTABLE=' + args.python3]
|
||||||
|
cmake_args += ['-DPython3_EXECUTABLE=' + args.python3]
|
||||||
|
|
||||||
if args.module_paths:
|
if args.module_paths:
|
||||||
module_paths = [common.to_posix_path(os.path.abspath(fp)) for fp in args.module_paths]
|
module_paths = [common.to_posix_path(os.path.abspath(fp)) for fp in args.module_paths]
|
||||||
|
Reference in New Issue
Block a user