Skip to content

Commit 2ae5554

Browse files
authored
ci(wheels): unbreak wheel release + other enhancements pt 1 (#4937)
## Description This PR fixes and improves a handful of wheels-related items: - Fix an issue where wheels produced with v3.1 releases were not getting uploaded to pypi - Update cibuildwheel to latest version (v3.2.1) - Remove the manylinux2014 builds, replace with manylinux_2_28 builds where applicable - Add CPython 3.14 wheels - Update macos-x86 runner to `macos-15-intel` - Update Python typestubs ## Notes - This PR ends support for pre-built wheels for glibc < 2.27 (CentOS-7 etc). However, the module can still be pip-installed locally, provided devtoolset-7+ (e.g., gcc-9+) is available. - Unless we arrive at a more elegant solution, we must remember to change the conditional in the "upload_pypi" step for every major OIIO release. --------- Signed-off-by: Zach Lewis <[email protected]>
1 parent 4c27f29 commit 2ae5554

File tree

7 files changed

+406
-408
lines changed

7 files changed

+406
-408
lines changed

.github/workflows/wheel.yml

Lines changed: 36 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -114,30 +114,10 @@ jobs:
114114
manylinux: manylinux_2_28
115115
python: cp313-manylinux_x86_64
116116
arch: x86_64
117-
# -------------------------------------------------------------------
118-
# CPython 64 bits manylinux2014
119-
# -------------------------------------------------------------------
120-
- build: CPython 3.9 64 bits manylinux2014
121-
manylinux: manylinux2014
122-
python: cp39-manylinux_x86_64
123-
arch: x86_64
124-
- build: CPython 3.10 64 bits manylinux2014
125-
manylinux: manylinux2014
126-
python: cp310-manylinux_x86_64
127-
arch: x86_64
128-
- build: CPython 3.11 64 bits manylinux2014
129-
manylinux: manylinux2014
130-
python: cp311-manylinux_x86_64
131-
arch: x86_64
132-
- build: CPython 3.12 64 bits manylinux2014
133-
manylinux: manylinux2014
134-
python: cp312-manylinux_x86_64
135-
arch: x86_64
136-
- build: CPython 3.13 64 bits manylinux2014
137-
manylinux: manylinux2014
138-
python: cp313-manylinux_x86_64
117+
- build: CPython 3.14 64 bits manylinux_2_28
118+
manylinux: manylinux_2_28
119+
python: cp314-manylinux_x86_64
139120
arch: x86_64
140-
141121
steps:
142122
- name: Checkout repo
143123
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -157,7 +137,7 @@ jobs:
157137

158138
- name: Build wheels
159139
# Note: the version of cibuildwheel should be kept in sync with src/python/stubs/CMakeLists.txt
160-
uses: pypa/cibuildwheel@d4a2945fcc8d13f20a1b99d461b8e844d5fc6e23 # v2.21.1
140+
uses: pypa/cibuildwheel@9c00cb4f6b517705a3794b22395aedc36257242c # v3.2.1
161141
env:
162142
# pass GITHUB_ACTIONS through to the build container so that custom
163143
# processes can tell they are running in CI.
@@ -170,7 +150,7 @@ jobs:
170150
CIBW_ENVIRONMENT: >
171151
CCACHE_DIR=/host//home/runner/.ccache
172152
CCACHE_COMPRESSION=yes
173-
CCACHE_PREBUILT=0
153+
CCACHE_PREBUILT=1
174154
CMAKE_BUILD_PARALLEL_LEVEL=4
175155
CTEST_PARALLEL_LEVEL=4
176156
SKBUILD_CMAKE_ARGS="-DLINKSTATIC=1"
@@ -220,26 +200,30 @@ jobs:
220200
# -------------------------------------------------------------------
221201
# CPython ARM 64 bits manylinux2014
222202
# -------------------------------------------------------------------
223-
- build: CPython 3.9 ARM 64 bits manylinux2014
224-
manylinux: manylinux2014
203+
- build: CPython 3.9 ARM 64 bits manylinux_2_28
204+
manylinux: manylinux_2_28
225205
python: cp39-manylinux_aarch64
226206
arch: aarch64
227-
- build: CPython 3.10 ARM 64 bits manylinux2014
228-
manylinux: manylinux2014
207+
- build: CPython 3.10 ARM 64 bits manylinux_2_28
208+
manylinux: manylinux_2_28
229209
python: cp310-manylinux_aarch64
230210
arch: aarch64
231-
- build: CPython 3.11 ARM 64 bits manylinux2014
232-
manylinux: manylinux2014
211+
- build: CPython 3.11 ARM 64 bits manylinux_2_28
212+
manylinux: manylinux_2_28
233213
python: cp311-manylinux_aarch64
234214
arch: aarch64
235-
- build: CPython 3.12 ARM 64 bits manylinux2014
236-
manylinux: manylinux2014
215+
- build: CPython 3.12 ARM 64 bits manylinux_2_28
216+
manylinux: manylinux_2_28
237217
python: cp312-manylinux_aarch64
238218
arch: aarch64
239-
- build: CPython 3.13 ARM 64 bits manylinux2014
240-
manylinux: manylinux2014
219+
- build: CPython 3.13 ARM 64 bits manylinux_2_28
220+
manylinux: manylinux_2_28
241221
python: cp313-manylinux_aarch64
242222
arch: aarch64
223+
- build: CPython 3.14 ARM 64 bits manylinux_2_28
224+
manylinux: manylinux_2_28
225+
python: cp314-manylinux_aarch64
226+
arch: aarch64
243227

244228
steps:
245229
- name: Checkout repo
@@ -259,7 +243,7 @@ jobs:
259243
restore-keys: wheel-${{runner.os}}-${{matrix.python}}
260244

261245
- name: Build wheels
262-
uses: pypa/cibuildwheel@d4a2945fcc8d13f20a1b99d461b8e844d5fc6e23 # v2.21.1
246+
uses: pypa/cibuildwheel@9c00cb4f6b517705a3794b22395aedc36257242c # v3.2.1
263247
env:
264248
CIBW_ENVIRONMENT_PASS_LINUX: GITHUB_ACTIONS
265249
CIBW_BEFORE_ALL: "source src/build-scripts/build_ccache.bash && pwd && /project/ext/dist/bin/ccache --max-size=200M && /project/ext/dist/bin/ccache -sv && export CMAKE_C_COMPILER_LAUNCHER=/project/ext/dist/bin/ccache CMAKE_CXX_COMPILER_LAUNCHER=/project/ext/dist/bin/ccache"
@@ -308,7 +292,7 @@ jobs:
308292

309293
macos:
310294
name: Build wheels on macOS
311-
runs-on: macos-13
295+
runs-on: macos-15-intel
312296
if: |
313297
github.event_name != 'schedule' ||
314298
github.repository == 'AcademySoftwareFoundation/OpenImageIO'
@@ -333,6 +317,9 @@ jobs:
333317
- build: CPython 3.13 64 bits
334318
python: cp313-macosx_x86_64
335319
arch: x86_64
320+
- build: CPython 3.14 64 bits
321+
python: cp314-macosx_x86_64
322+
arch: x86_64
336323

337324
steps:
338325
- name: Checkout repo
@@ -355,12 +342,12 @@ jobs:
355342
run: |
356343
brew install ninja ccache || true
357344
358-
- name: Remove brew OpenEXR/Imath
345+
- name: Brew uninstall problematic dependencies
359346
run: |
360-
brew uninstall --ignore-dependencies openexr imath || true
347+
brew uninstall -f --ignore-dependencies openexr imath expat cmake || true
361348
362349
- name: Build wheels
363-
uses: pypa/cibuildwheel@d4a2945fcc8d13f20a1b99d461b8e844d5fc6e23 # v2.21.1
350+
uses: pypa/cibuildwheel@9c00cb4f6b517705a3794b22395aedc36257242c # v3.2.1
364351
env:
365352
CIBW_BUILD: ${{ matrix.python }}
366353
CIBW_ARCHS: ${{ matrix.arch }}
@@ -419,6 +406,9 @@ jobs:
419406
- build: CPython 3.13 ARM 64 bits
420407
python: cp313-macosx_arm64
421408
arch: arm64
409+
- build: CPython 3.14 ARM 64 bits
410+
python: cp314-macosx_arm64
411+
arch: arm64
422412

423413
steps:
424414
- name: Checkout repo
@@ -442,7 +432,7 @@ jobs:
442432
brew install ninja ccache || true
443433
444434
- name: Build wheels
445-
uses: pypa/cibuildwheel@d4a2945fcc8d13f20a1b99d461b8e844d5fc6e23 # v2.21.1
435+
uses: pypa/cibuildwheel@9c00cb4f6b517705a3794b22395aedc36257242c # v3.2.1
446436
env:
447437
CIBW_BUILD: ${{ matrix.python }}
448438
CIBW_ARCHS: ${{ matrix.arch }}
@@ -496,6 +486,9 @@ jobs:
496486
- build: CPython 3.13 64 bits
497487
python: cp313-win_amd64
498488
arch: AMD64
489+
- build: CPython 3.14 64 bits
490+
python: cp314-win_amd64
491+
arch: AMD64
499492

500493
steps:
501494
- name: Checkout repo
@@ -507,7 +500,7 @@ jobs:
507500
python-version: '3.9'
508501

509502
- name: Build wheels
510-
uses: pypa/cibuildwheel@d4a2945fcc8d13f20a1b99d461b8e844d5fc6e23 # v2.21.1
503+
uses: pypa/cibuildwheel@9c00cb4f6b517705a3794b22395aedc36257242c # v3.2.1
511504
env:
512505
CIBW_BUILD: ${{ matrix.python }}
513506
CIBW_ARCHS: ${{ matrix.arch }}
@@ -529,7 +522,7 @@ jobs:
529522
runs-on: ubuntu-latest
530523
permissions:
531524
id-token: write
532-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v3.0.') && github.repository == 'AcademySoftwareFoundation/OpenImageIO'
525+
if: github.event_name == 'push' && (startsWith(github.event.ref, 'refs/tags/v3.0.') || startsWith(github.event.ref, 'refs/tags/v3.1.')) && github.repository == 'AcademySoftwareFoundation/OpenImageIO'
533526
steps:
534527
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
535528

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ classifiers = [
2424
"Programming Language :: Python :: 3.11",
2525
"Programming Language :: Python :: 3.12",
2626
"Programming Language :: Python :: 3.13",
27+
"Programming Language :: Python :: 3.14",
2728
"License :: OSI Approved :: Apache Software License",
2829
"Topic :: Multimedia :: Graphics",
2930
"Topic :: Multimedia :: Video",
@@ -32,7 +33,7 @@ classifiers = [
3233
]
3334
requires-python = ">= 3.9"
3435
dependencies = [
35-
"numpy>=1.19",
36+
"numpy>=2.0,<3",
3637
]
3738

3839
[project.urls]
@@ -51,7 +52,7 @@ oiiotool = "OpenImageIO:_command_line"
5152
build-backend = "scikit_build_core.build"
5253
requires = [
5354
"scikit-build-core>=0.10.6,<1",
54-
"pybind11>=2.13,<3",
55+
"pybind11>=2.13,<4",
5556
]
5657

5758
[tool.scikit-build]
@@ -109,6 +110,8 @@ skip = [
109110
# Building with musl seems to work, but the repair-wheel step seems to fail...
110111
# This may be a bug in repairwheel (or auditwheel)?
111112
"*musllinux*",
113+
# Skip free-threading builds
114+
"cp3??t-*",
112115
]
113116
test-command = "oiiotool --buildinfo"
114117

src/build-scripts/build_ccache.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ echo "HOME=$HOME"
1616
echo "PWD=$PWD"
1717
echo "ARCH=$ARCH"
1818

19-
CCACHE_PREBULT=${CCACHE_PREBULT:=1}
19+
CCACHE_PREBUILT=${CCACHE_PREBUILT:=1}
2020

2121
# Repo and branch/tag/commit of ccache to download if we don't have it yet
2222
CCACHE_REPO=${CCACHE_REPO:=https://github.com/ccache/ccache}

src/cmake/build_OpenColorIO.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
set_cache (OpenColorIO_BUILD_VERSION 2.4.2 "OpenColorIO version for local builds")
1010
set (OpenColorIO_GIT_REPOSITORY "https://github.com/AcademySoftwareFoundation/OpenColorIO")
1111
set (OpenColorIO_GIT_TAG "v${OpenColorIO_BUILD_VERSION}")
12-
set_cache (OpenColorIO_BUILD_SHARED_LIBS OFF #ON
12+
set_cache (OpenColorIO_BUILD_SHARED_LIBS OFF
1313
DOC "Should a local OpenColorIO build, if necessary, build shared libraries" ADVANCED)
1414
# We would prefer to build a static OCIO, but haven't figured out how to make
1515
# it all work with the static dependencies, it just makes things complicated
@@ -24,9 +24,9 @@ unset (OPENCOLORIO_VERSION_MINOR)
2424
unset (OpenColorIO_DIR)
2525

2626
checked_find_package(pystring VERSION_MIN 1.1.3)
27-
checked_find_package(expat REQUIRED VERSION_MIN 2.5)
28-
checked_find_package(yaml-cpp REQUIRED VERSION_MIN 0.6.0)
29-
checked_find_package(minizip-ng REQUIRED VERSION_MIN 3.0.0)
27+
checked_find_package(expat REQUIRED VERSION_MIN 2.6)
28+
checked_find_package(yaml-cpp REQUIRED VERSION_MIN 0.8.0)
29+
checked_find_package(minizip-ng REQUIRED VERSION_MIN 4.0.10)
3030

3131
string (MAKE_C_IDENTIFIER ${OpenColorIO_BUILD_VERSION} OpenColorIO_VERSION_IDENT)
3232

src/cmake/build_minizip-ng.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
######################################################################
88

99

10-
set_cache (minizip-ng_BUILD_VERSION 4.0.7 "minizip-ng version for local builds")
10+
set_cache (minizip-ng_BUILD_VERSION 4.0.10 "minizip-ng version for local builds")
1111
set (minizip-ng_GIT_REPOSITORY "https://github.com/zlib-ng/minizip-ng")
1212
set (minizip-ng_GIT_TAG "${minizip-ng_BUILD_VERSION}")
1313

src/python/stubs/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ set (_stub_file "${CMAKE_SOURCE_DIR}/src/python/stubs/OpenImageIO/__init__.pyi")
88
# the version of python that OpenImageIO is being built against.
99
# Note: the version of cibuildwheel should be kept in sync with .github/workflows/wheel.yml
1010
add_custom_command (COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/python/stubs/generate_stubs_local.py
11-
--repo-root ${CMAKE_SOURCE_DIR} --python-version="3.11" --cibuildwheel-version="2.21.1"
11+
--repo-root ${CMAKE_SOURCE_DIR} --python-version="3.11" --cibuildwheel-version="3.2.1"
1212
--output-dir "${CMAKE_BINARY_DIR}/wheelhouse"
1313
OUTPUT "${CMAKE_BINARY_DIR}/wheelhouse/OpenImageIO/__init__.pyi"
1414
DEPENDS "${CMAKE_SOURCE_DIR}/src/python/stubs/generate_stubs.py"

0 commit comments

Comments
 (0)