Skip to content

Commit 77e92a9

Browse files
authored
Python 3.13 wheels (#2052)
* Python 3.13 wheels Signed-off-by: Rémi Achard <[email protected]> * Build mac ARM wheels on Apple Silicon runners to enable testing Signed-off-by: Rémi Achard <[email protected]> * Fix upload_pypi job dependencies Signed-off-by: Rémi Achard <[email protected]> --------- Signed-off-by: Rémi Achard <[email protected]>
1 parent 145bce2 commit 77e92a9

File tree

4 files changed

+70
-27
lines changed

4 files changed

+70
-27
lines changed

.github/workflows/wheel_workflow.yml

Lines changed: 62 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,6 @@ jobs:
8181
# -------------------------------------------------------------------
8282
# CPython 64 bits manylinux_2_28
8383
# -------------------------------------------------------------------
84-
- build: CPython 3.7 64 bits manylinux_2_28
85-
manylinux: manylinux_2_28
86-
python: cp37-manylinux_x86_64
87-
arch: x86_64
8884
- build: CPython 3.8 64 bits manylinux_2_28
8985
manylinux: manylinux_2_28
9086
python: cp38-manylinux_x86_64
@@ -105,13 +101,13 @@ jobs:
105101
manylinux: manylinux_2_28
106102
python: cp312-manylinux_x86_64
107103
arch: x86_64
104+
- build: CPython 3.13 64 bits manylinux_2_28
105+
manylinux: manylinux_2_28
106+
python: cp313-manylinux_x86_64
107+
arch: x86_64
108108
# -------------------------------------------------------------------
109109
# CPython 64 bits manylinux2014
110110
# -------------------------------------------------------------------
111-
- build: CPython 3.7 64 bits manylinux2014
112-
manylinux: manylinux2014
113-
python: cp37-manylinux_x86_64
114-
arch: x86_64
115111
- build: CPython 3.8 64 bits manylinux2014
116112
manylinux: manylinux2014
117113
python: cp38-manylinux_x86_64
@@ -132,13 +128,13 @@ jobs:
132128
manylinux: manylinux2014
133129
python: cp312-manylinux_x86_64
134130
arch: x86_64
131+
- build: CPython 3.13 64 bits manylinux2014
132+
manylinux: manylinux2014
133+
python: cp313-manylinux_x86_64
134+
arch: x86_64
135135
# -------------------------------------------------------------------
136136
# CPython ARM 64 bits manylinux2014
137137
# -------------------------------------------------------------------
138-
- build: CPython 3.7 ARM 64 bits manylinux2014
139-
manylinux: manylinux2014
140-
python: cp37-manylinux_aarch64
141-
arch: aarch64
142138
- build: CPython 3.8 ARM 64 bits manylinux2014
143139
manylinux: manylinux2014
144140
python: cp38-manylinux_aarch64
@@ -159,22 +155,26 @@ jobs:
159155
manylinux: manylinux2014
160156
python: cp312-manylinux_aarch64
161157
arch: aarch64
158+
- build: CPython 3.13 ARM 64 bits manylinux2014
159+
manylinux: manylinux2014
160+
python: cp313-manylinux_aarch64
161+
arch: aarch64
162162

163163
steps:
164164
- uses: actions/checkout@v4
165165

166166
- uses: actions/setup-python@v5
167167
name: Install Python
168168
with:
169-
python-version: '3.8'
169+
python-version: '3.9'
170170

171171
- name: Set up QEMU
172172
uses: docker/setup-qemu-action@v3
173173
with:
174174
platforms: all
175175

176176
- name: Build wheels
177-
uses: pypa/cibuildwheel@v2.16.5
177+
uses: pypa/cibuildwheel@v2.21.1
178178
env:
179179
CIBW_BUILD: ${{ matrix.python }}
180180
CIBW_ARCHS: ${{ matrix.arch }}
@@ -203,9 +203,6 @@ jobs:
203203
# -------------------------------------------------------------------
204204
# CPython 64 bits
205205
# -------------------------------------------------------------------
206-
- build: CPython 3.7 64 bits
207-
python: cp37-macosx_x86_64
208-
arch: x86_64
209206
- build: CPython 3.8 64 bits
210207
python: cp38-macosx_x86_64
211208
arch: x86_64
@@ -221,6 +218,43 @@ jobs:
221218
- build: CPython 3.12 64 bits
222219
python: cp312-macosx_x86_64
223220
arch: x86_64
221+
- build: CPython 3.13 64 bits
222+
python: cp313-macosx_x86_64
223+
arch: x86_64
224+
225+
steps:
226+
- uses: actions/checkout@v4
227+
228+
- uses: actions/setup-python@v5
229+
name: Install Python
230+
with:
231+
python-version: '3.9'
232+
233+
- name: Build wheels
234+
uses: pypa/[email protected]
235+
env:
236+
CIBW_BUILD: ${{ matrix.python }}
237+
CIBW_ARCHS: ${{ matrix.arch }}
238+
239+
- uses: actions/upload-artifact@v4
240+
with:
241+
name: cibw-wheels-${{ matrix.python }}
242+
path: ./wheelhouse/*.whl
243+
244+
# ---------------------------------------------------------------------------
245+
# macOS ARM Wheels
246+
# ---------------------------------------------------------------------------
247+
248+
macos-arm:
249+
name: Build wheels on macOS ARM
250+
runs-on: macos-14
251+
# Don't run on OCIO forks
252+
if: |
253+
github.event_name != 'schedule' ||
254+
github.repository == 'AcademySoftwareFoundation/OpenColorIO'
255+
strategy:
256+
matrix:
257+
include:
224258
# -------------------------------------------------------------------
225259
# CPython ARM 64 bits
226260
# -------------------------------------------------------------------
@@ -239,17 +273,20 @@ jobs:
239273
- build: CPython 3.12 ARM 64 bits
240274
python: cp312-macosx_arm64
241275
arch: arm64
276+
- build: CPython 3.13 ARM 64 bits
277+
python: cp313-macosx_arm64
278+
arch: arm64
242279

243280
steps:
244281
- uses: actions/checkout@v4
245282

246283
- uses: actions/setup-python@v5
247284
name: Install Python
248285
with:
249-
python-version: '3.8'
286+
python-version: '3.9'
250287

251288
- name: Build wheels
252-
uses: pypa/cibuildwheel@v2.16.5
289+
uses: pypa/cibuildwheel@v2.21.1
253290
env:
254291
CIBW_BUILD: ${{ matrix.python }}
255292
CIBW_ARCHS: ${{ matrix.arch }}
@@ -276,9 +313,6 @@ jobs:
276313
# -------------------------------------------------------------------
277314
# CPython 64 bits
278315
# -------------------------------------------------------------------
279-
- build: CPython 3.7 64 bits
280-
python: cp37-win_amd64
281-
arch: AMD64
282316
- build: CPython 3.8 64 bits
283317
python: cp38-win_amd64
284318
arch: AMD64
@@ -294,17 +328,20 @@ jobs:
294328
- build: CPython 3.12 64 bits
295329
python: cp312-win_amd64
296330
arch: AMD64
331+
- build: CPython 3.13 64 bits
332+
python: cp313-win_amd64
333+
arch: AMD64
297334

298335
steps:
299336
- uses: actions/checkout@v4
300337

301338
- uses: actions/setup-python@v5
302339
name: Install Python
303340
with:
304-
python-version: '3.8'
341+
python-version: '3.9'
305342

306343
- name: Build wheels
307-
uses: pypa/cibuildwheel@v2.16.5
344+
uses: pypa/cibuildwheel@v2.21.1
308345
env:
309346
CIBW_BUILD: ${{ matrix.python }}
310347
CIBW_ARCHS: ${{ matrix.arch }}
@@ -316,7 +353,7 @@ jobs:
316353

317354

318355
upload_pypi:
319-
needs: [sdist, linux, macos, windows]
356+
needs: [sdist, linux, macos, macos-arm, windows]
320357
runs-on: ubuntu-latest
321358
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
322359
steps:

pyproject.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,13 @@ test-command = [
3030
before-build = "share/ci/scripts/linux/yum/install_docs_env.sh"
3131

3232
[tool.cibuildwheel.macos]
33+
# cibuildwheel in some cases set this to 10.9 by default, OCIO needs >= 10.13
34+
# macOS ARM wheels needs 11.0, cibuildwheel will automatically bump where appropriate
35+
environment = { MACOSX_DEPLOYMENT_TARGET="10.13" }
3336
before-build = "share/ci/scripts/macos/install_docs_env.sh"
3437

3538
[tool.cibuildwheel.windows]
36-
environment = { PATH="$GITHUB_WORKSPACE/doxygen;$PATH" }
39+
# OCIO_PYTHON_LOAD_DLLS_FROM_PATH can cause segfaults in the current wheel workflow
40+
# Disable for now as wheels are built with static dependencies.
41+
environment = { PATH="$GITHUB_WORKSPACE/doxygen;$PATH", OCIO_PYTHON_LOAD_DLLS_FROM_PATH="0" }
3742
before-build = 'bash -c "share/ci/scripts/windows/install_docs_env.sh $GITHUB_WORKSPACE/doxygen"'

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ classifiers =
1313
Programming Language :: Python :: 3.10
1414
Programming Language :: Python :: 3.11
1515
Programming Language :: Python :: 3.12
16+
Programming Language :: Python :: 3.13
1617
Programming Language :: Python :: Implementation :: CPython
1718
Programming Language :: C++
1819
description = OpenColorIO (OCIO) is a complete color management solution geared towards motion picture production with an emphasis on visual effects and computer animation.

share/cmake/modules/FindExtPackages.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ if(OCIO_BUILD_PYTHON OR OCIO_BUILD_DOCS)
179179
# pybind11 2.9 fixes issues with MS Visual Studio 2022 (Debug).
180180
ocio_handle_dependency( pybind11 REQUIRED ALLOW_INSTALL
181181
MIN_VERSION 2.9.2
182-
RECOMMENDED_VERSION 2.11.1)
182+
RECOMMENDED_VERSION 2.12.1)
183183
endif()
184184
endif()
185185

0 commit comments

Comments
 (0)