From 5193a5d222826db8eb9c7f8d7ab05e0c597aefda Mon Sep 17 00:00:00 2001 From: Steveice10 <1269164+Steveice10@users.noreply.github.com> Date: Mon, 6 Nov 2023 12:26:50 -0800 Subject: [PATCH] build: Remove need for system Python to download Qt on macOS. (#7125) --- .ci/ios.sh | 5 ----- .ci/macos.sh | 5 ----- CMakeModules/DownloadExternals.cmake | 11 ++++++++++- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.ci/ios.sh b/.ci/ios.sh index 8a0d23497..92e1776c8 100755 --- a/.ci/ios.sh +++ b/.ci/ios.sh @@ -1,10 +1,5 @@ #!/bin/bash -ex -# TODO: Work around pip install issues with Python 3.12 in the GitHub runner image. -# See: https://github.com/actions/runner-images/issues/8709 -PYTHON_PATH=$(brew --prefix python@3.11) -export PATH=$PYTHON_PATH/bin:$PYTHON_PATH/libexec/bin:$PATH - mkdir build && cd build cmake .. -GNinja \ -DCMAKE_BUILD_TYPE=Release \ diff --git a/.ci/macos.sh b/.ci/macos.sh index 99a348730..c4e2a284b 100755 --- a/.ci/macos.sh +++ b/.ci/macos.sh @@ -1,10 +1,5 @@ #!/bin/bash -ex -# TODO: Work around pip install issues with Python 3.12 in the GitHub runner image. -# See: https://github.com/actions/runner-images/issues/8709 -PYTHON_PATH=$(brew --prefix python@3.11) -export PATH=$PYTHON_PATH/bin:$PYTHON_PATH/libexec/bin:$PATH - mkdir build && cd build cmake .. -GNinja \ -DCMAKE_BUILD_TYPE=Release \ diff --git a/CMakeModules/DownloadExternals.cmake b/CMakeModules/DownloadExternals.cmake index 410a8801f..c7abe8e52 100644 --- a/CMakeModules/DownloadExternals.cmake +++ b/CMakeModules/DownloadExternals.cmake @@ -67,13 +67,22 @@ function(download_qt target) if (NOT EXISTS "${prefix}") message(STATUS "Downloading binaries for Qt...") + set(AQT_PREBUILD_BASE_URL "https://github.com/miurahr/aqtinstall/releases/download/v3.1.9") if (WIN32) set(aqt_path "${base_path}/aqt.exe") file(DOWNLOAD - https://github.com/miurahr/aqtinstall/releases/download/v3.1.7/aqt.exe + ${AQT_PREBUILD_BASE_URL}/aqt.exe ${aqt_path} SHOW_PROGRESS) execute_process(COMMAND ${aqt_path} ${install_args} WORKING_DIRECTORY ${base_path}) + elseif (APPLE) + set(aqt_path "${base_path}/aqt-macos") + file(DOWNLOAD + ${AQT_PREBUILD_BASE_URL}/aqt-macos + ${aqt_path} SHOW_PROGRESS) + execute_process(COMMAND chmod +x ${aqt_path}) + execute_process(COMMAND ${aqt_path} ${install_args} + WORKING_DIRECTORY ${base_path}) else() # aqt does not offer binary releases for other platforms, so download and run from pip. set(aqt_install_path "${base_path}/aqt")