From 958441c3626c43c77ace6ba287de9a6245b7b597 Mon Sep 17 00:00:00 2001 From: Jonas Vautherin Date: Wed, 15 Nov 2023 15:25:02 +0100 Subject: [PATCH 1/3] [v1.4] downgrade python to 3.11 for macOS --- .github/workflows/main.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3321d9cd82..119e15adae 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -486,6 +486,11 @@ jobs: - name: macOS-framework build-framework: ON steps: + - name: Install Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + architecture: 'x64' - uses: actions/checkout@v4 with: submodules: recursive @@ -540,6 +545,11 @@ jobs: platform: SIMULATOR64 sdk: iphonesimulator steps: + - name: Install Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + architecture: 'x64' - uses: actions/checkout@v4 with: submodules: recursive From 6239aa0e835c959f16bcd57e4ad0271766a32f29 Mon Sep 17 00:00:00 2001 From: Jonas Vautherin Date: Wed, 15 Nov 2023 23:59:10 +0100 Subject: [PATCH 2/3] [v1.4] fix mavlink build in macOS CI --- third_party/mavlink/CMakeLists.txt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/third_party/mavlink/CMakeLists.txt b/third_party/mavlink/CMakeLists.txt index 18759d7137..ef0eff9940 100644 --- a/third_party/mavlink/CMakeLists.txt +++ b/third_party/mavlink/CMakeLists.txt @@ -11,9 +11,18 @@ list(APPEND CMAKE_ARGS "-DCMAKE_POSITION_INDEPENDENT_CODE=ON" ) -# Without this GitHub actions picks the wrong python3 executable. -set(Python3_FIND_REGISTRY "NEVER") -set(Python3_FIND_FRAMEWORK "NEVER") +if (POLICY CMP0094) + cmake_policy(SET CMP0094 NEW) # FindPython should return the first matching Python +endif () + +# Needed to find the right Python on macOS +if (NOT DEFINED Python_FIND_FRAMEWORK) + set(Python_FIND_FRAMEWORK "LAST") +endif() + +# Needed to find the right Python on Windows +set(Python_FIND_REGISTRY "FIRST") + find_package(Python3 COMPONENTS Interpreter REQUIRED) ExternalProject_add( From 2390d1949893c94785a8dc219702108b7e5f08aa Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Sun, 19 Nov 2023 07:39:41 +1300 Subject: [PATCH 3/3] third_party: another try for Python on Windows Signed-off-by: Julian Oes --- third_party/mavlink/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/mavlink/CMakeLists.txt b/third_party/mavlink/CMakeLists.txt index ef0eff9940..3083a8a2ed 100644 --- a/third_party/mavlink/CMakeLists.txt +++ b/third_party/mavlink/CMakeLists.txt @@ -21,7 +21,7 @@ if (NOT DEFINED Python_FIND_FRAMEWORK) endif() # Needed to find the right Python on Windows -set(Python_FIND_REGISTRY "FIRST") +set(Python3_FIND_REGISTRY "NEVER") find_package(Python3 COMPONENTS Interpreter REQUIRED)