Skip to content

Commit 88661b1

Browse files
authored
Fix wheel building on MacOS 14 and sync up conan version in wheels and conda (#3522)
* try builds on macos-12 * use ld_classic for macos * bump up to macos-13/14 * use intel and arm runners * sync up tbb from conan with conda * cleanup * bump up min MACOSX_DEPLOYMENT_TARGET * sync up min CMAKE_OSX_DEPLOYMENT_TARGET * sync up DCMAKE_OSX_DEPLOYMENT_TARGET * typo * build all * Update CMakeLists.txt * Update CMakeLists.txt * Update release.yml
1 parent 96da009 commit 88661b1

File tree

7 files changed

+12
-18
lines changed

7 files changed

+12
-18
lines changed

.github/workflows/wheel.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- uses: pypa/[email protected]
2727
env:
2828
CIBW_BUILD: ${{ inputs.build }}-*
29-
MACOSX_DEPLOYMENT_TARGET: "10.15"
29+
MACOSX_DEPLOYMENT_TARGET: "11.0"
3030

3131
- name: Verify clean directory
3232
run: git diff --exit-code

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ if(SKBUILD)
1212
VERSION ${SKBUILD_PROJECT_VERSION}
1313
LANGUAGES CXX
1414
)
15+
# AppleClang 15 changed linking order
16+
# https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Linking
17+
if(APPLE AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15.0)
18+
message(STATUS "Building on macOS with Clang 15 or newer")
19+
add_link_options("-ld_classic")
20+
endif()
1521
add_definitions(-DSCIPP_VERSION="${SKBUILD_PROJECT_VERSION_FULL}")
1622
message(STATUS "Got version from SKBUILD: ${SKBUILD_PROJECT_VERSION_FULL}")
1723
else()

CMakePresets.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"inherits": "base",
3434
"description": "MacOS options for CI build (PR and Main)",
3535
"cacheVariables": {
36-
"CMAKE_OSX_DEPLOYMENT_TARGET": "10.15"
36+
"CMAKE_OSX_DEPLOYMENT_TARGET": "11.0"
3737
}
3838
},
3939
{
@@ -69,7 +69,7 @@
6969
"inherits": "package",
7070
"description": "MacOS options for package build for x86_64",
7171
"cacheVariables": {
72-
"CMAKE_OSX_DEPLOYMENT_TARGET": "10.15",
72+
"CMAKE_OSX_DEPLOYMENT_TARGET": "11.0",
7373
"CMAKE_OSX_ARCHITECTURES": "x86_64"
7474
}
7575
},
@@ -173,4 +173,4 @@
173173
}
174174
}
175175
]
176-
}
176+
}

conda/cmake-package-test/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
if sys.platform == 'darwin':
2222
cmake_flags.append(
23-
f'-DCMAKE_OSX_DEPLOYMENT_TARGET={os.getenv("OSX_VERSION", "10.14")}'
23+
f'-DCMAKE_OSX_DEPLOYMENT_TARGET={os.getenv("OSX_VERSION", "11.0")}'
2424
)
2525
elif sys.platform == 'win32':
2626
cmake_flags.extend(['-G', 'Visual Studio 16 2019'])

lib/CMakeLists.txt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,6 @@ option(BENCHMARK "Enable benchmarks" OFF)
1717

1818
include(scipp-conan)
1919

20-
# Currently, scikit-build does not support FindPython.
21-
if(SKBUILD)
22-
set(Python_EXECUTABLE "${PYTHON_EXECUTABLE}")
23-
set(Python_INCLUDE_DIR "${PYTHON_INCLUDE_DIR}")
24-
unset(PYTHON_EXECUTABLE)
25-
unset(PYTHON_INCLUDE_DIR)
26-
unset(PYTHON_LIBRARY)
27-
unset(PYTHON_VERSION_STRING)
28-
endif()
2920
set(Python_FIND_IMPLEMENTATIONS CPython PyPy)
3021

3122
find_package(Benchmark)

lib/cmake/scipp-conan.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ list(APPEND CMAKE_PREFIX_PATH ${CMAKE_CURRENT_BINARY_DIR})
3131
option(CONAN_TBB "Use TBB from conan" OFF)
3232
if(SKBUILD OR CONAN_TBB)
3333
# Conda builds install tbb via conda, not conan
34-
set(CONAN_ONETBB onetbb/2021.7.0)
34+
set(CONAN_ONETBB onetbb/2021.12.0)
3535
# The deploy generator is used to install dependencies into a know location.
3636
# The RUNTIME_DEPENDENCIES DIRECTORIES install option is then used to find the
3737
# dependencies. This is actually required only for Windows, since on Linux and

pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ test-command = "pytest --ignore {project}/tests/plotting --ignore {project}/test
8484
skip = ["pp*", "*musllinux*"]
8585
build-verbosity = 1
8686

87-
[tool.cibuildwheel.macos]
88-
archs = ["x86_64", "arm64"]
89-
9087
[tool.bandit.assert_used]
9188
skips = [
9289
"*/*_test.py",

0 commit comments

Comments
 (0)