From 496ca1050dadedad5224e68fb7f925f071aff07d Mon Sep 17 00:00:00 2001 From: Alan Garny Date: Tue, 19 Jul 2022 16:45:32 +1200 Subject: [PATCH] Python wheels: enforce deployment on macOS 10.15 and later. See https://github.com/feast-dev/feast/pull/2890/files and https://github.com/pypa/cibuildwheel/issues/952. --- .github/workflows/wheels.yml | 3 +++ cmake/environmentchecks.cmake | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index a0f9ee223..2043a30d2 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -36,6 +36,9 @@ jobs: run: python -m cibuildwheel --output-dir wheelhouse env: CIBW_ARCHS: auto64 + CIBW_ENVIRONMENT: > + _PYTHON_HOST_PLATFORM=macosx-10.15-x86_64 + MACOSX_DEPLOYMENT_TARGET: 10.15 - name: Upload artifacts uses: actions/upload-artifact@v3 with: diff --git a/cmake/environmentchecks.cmake b/cmake/environmentchecks.cmake index bcbb907eb..5033cb8d9 100644 --- a/cmake/environmentchecks.cmake +++ b/cmake/environmentchecks.cmake @@ -57,6 +57,12 @@ elseif(NOT ${ARCHITECTURE} EQUAL 64) message(FATAL_ERROR "${CMAKE_PROJECT_NAME} can only be built in 64-bit mode.") endif() +# Make sure that we are building libOpenCOR for macOS 10.15 and later. + +if(APPLE AND NOT CMAKE_OSX_DEPLOYMENT_TARGET VERSION_GREATER_EQUAL 10.15) + message(FATAL_ERROR "${CMAKE_PROJECT_NAME} can only be built for macOS 10.15 and later.") +endif() + # Check whether we are dealing with a single or multiple configuration. get_property(IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)