Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 40 additions & 47 deletions .github/workflows/wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,30 +114,10 @@ jobs:
manylinux: manylinux_2_28
python: cp313-manylinux_x86_64
arch: x86_64
# -------------------------------------------------------------------
# CPython 64 bits manylinux2014
# -------------------------------------------------------------------
- build: CPython 3.9 64 bits manylinux2014
manylinux: manylinux2014
python: cp39-manylinux_x86_64
arch: x86_64
- build: CPython 3.10 64 bits manylinux2014
manylinux: manylinux2014
python: cp310-manylinux_x86_64
arch: x86_64
- build: CPython 3.11 64 bits manylinux2014
manylinux: manylinux2014
python: cp311-manylinux_x86_64
arch: x86_64
- build: CPython 3.12 64 bits manylinux2014
manylinux: manylinux2014
python: cp312-manylinux_x86_64
arch: x86_64
- build: CPython 3.13 64 bits manylinux2014
manylinux: manylinux2014
python: cp313-manylinux_x86_64
- build: CPython 3.14 64 bits manylinux_2_28
manylinux: manylinux_2_28
python: cp314-manylinux_x86_64
arch: x86_64

steps:
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand All @@ -157,7 +137,7 @@ jobs:

- name: Build wheels
# Note: the version of cibuildwheel should be kept in sync with src/python/stubs/CMakeLists.txt
uses: pypa/cibuildwheel@d4a2945fcc8d13f20a1b99d461b8e844d5fc6e23 # v2.21.1
uses: pypa/cibuildwheel@9c00cb4f6b517705a3794b22395aedc36257242c # v3.2.1
env:
# pass GITHUB_ACTIONS through to the build container so that custom
# processes can tell they are running in CI.
Expand All @@ -170,7 +150,7 @@ jobs:
CIBW_ENVIRONMENT: >
CCACHE_DIR=/host//home/runner/.ccache
CCACHE_COMPRESSION=yes
CCACHE_PREBUILT=0
CCACHE_PREBUILT=1
CMAKE_BUILD_PARALLEL_LEVEL=4
CTEST_PARALLEL_LEVEL=4
SKBUILD_CMAKE_ARGS="-DLINKSTATIC=1"
Expand Down Expand Up @@ -220,33 +200,37 @@ jobs:
# -------------------------------------------------------------------
# CPython ARM 64 bits manylinux2014
# -------------------------------------------------------------------
- build: CPython 3.9 ARM 64 bits manylinux2014
manylinux: manylinux2014
- build: CPython 3.9 ARM 64 bits manylinux_2_28
manylinux: manylinux_2_28
python: cp39-manylinux_aarch64
arch: aarch64
- build: CPython 3.10 ARM 64 bits manylinux2014
manylinux: manylinux2014
- build: CPython 3.10 ARM 64 bits manylinux_2_28
manylinux: manylinux_2_28
python: cp310-manylinux_aarch64
arch: aarch64
- build: CPython 3.11 ARM 64 bits manylinux2014
manylinux: manylinux2014
- build: CPython 3.11 ARM 64 bits manylinux_2_28
manylinux: manylinux_2_28
python: cp311-manylinux_aarch64
arch: aarch64
- build: CPython 3.12 ARM 64 bits manylinux2014
manylinux: manylinux2014
- build: CPython 3.12 ARM 64 bits manylinux_2_28
manylinux: manylinux_2_28
python: cp312-manylinux_aarch64
arch: aarch64
- build: CPython 3.13 ARM 64 bits manylinux2014
manylinux: manylinux2014
- build: CPython 3.13 ARM 64 bits manylinux_2_28
manylinux: manylinux_2_28
python: cp313-manylinux_aarch64
arch: aarch64
- build: CPython 3.14 ARM 64 bits manylinux_2_28
manylinux: manylinux_2_28
python: cp314-manylinux_aarch64
arch: aarch64

steps:
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Install Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.
with:
python-version: '3.9'

Expand All @@ -259,7 +243,7 @@ jobs:
restore-keys: wheel-${{runner.os}}-${{matrix.python}}

- name: Build wheels
uses: pypa/cibuildwheel@d4a2945fcc8d13f20a1b99d461b8e844d5fc6e23 # v2.21.1
uses: pypa/cibuildwheel@9c00cb4f6b517705a3794b22395aedc36257242c # v3.2.1
env:
CIBW_ENVIRONMENT_PASS_LINUX: GITHUB_ACTIONS
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"
Expand Down Expand Up @@ -308,7 +292,7 @@ jobs:

macos:
name: Build wheels on macOS
runs-on: macos-13
runs-on: macos-15-intel
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, my bad, I totally didn't think about the wheels when I did this very change on the regular CI.

if: |
github.event_name != 'schedule' ||
github.repository == 'AcademySoftwareFoundation/OpenImageIO'
Expand All @@ -333,6 +317,9 @@ jobs:
- build: CPython 3.13 64 bits
python: cp313-macosx_x86_64
arch: x86_64
- build: CPython 3.14 64 bits
python: cp314-macosx_x86_64
arch: x86_64

steps:
- name: Checkout repo
Expand All @@ -341,7 +328,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: '3.9'
python-version: 3.9

- name: ccache-restore
id: ccache-restore
Expand All @@ -355,12 +342,12 @@ jobs:
run: |
brew install ninja ccache || true

- name: Remove brew OpenEXR/Imath
- name: Brew uninstall problematic dependencies
run: |
brew uninstall --ignore-dependencies openexr imath || true
brew uninstall -f --ignore-dependencies openexr imath expat cmake || true

- name: Build wheels
uses: pypa/cibuildwheel@d4a2945fcc8d13f20a1b99d461b8e844d5fc6e23 # v2.21.1
uses: pypa/cibuildwheel@9c00cb4f6b517705a3794b22395aedc36257242c # v3.2.1
env:
CIBW_BUILD: ${{ matrix.python }}
CIBW_ARCHS: ${{ matrix.arch }}
Expand Down Expand Up @@ -419,6 +406,9 @@ jobs:
- build: CPython 3.13 ARM 64 bits
python: cp313-macosx_arm64
arch: arm64
- build: CPython 3.14 ARM 64 bits
python: cp314-macosx_arm64
arch: arm64

steps:
- name: Checkout repo
Expand All @@ -427,7 +417,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: '3.9'
python-version: 3.9

- name: ccache-restore
id: ccache-restore
Expand All @@ -442,7 +432,7 @@ jobs:
brew install ninja ccache || true

- name: Build wheels
uses: pypa/cibuildwheel@d4a2945fcc8d13f20a1b99d461b8e844d5fc6e23 # v2.21.1
uses: pypa/cibuildwheel@9c00cb4f6b517705a3794b22395aedc36257242c # v3.2.1
env:
CIBW_BUILD: ${{ matrix.python }}
CIBW_ARCHS: ${{ matrix.arch }}
Expand Down Expand Up @@ -496,6 +486,9 @@ jobs:
- build: CPython 3.13 64 bits
python: cp313-win_amd64
arch: AMD64
- build: CPython 3.14 64 bits
python: cp314-win_amd64
arch: AMD64

steps:
- name: Checkout repo
Expand All @@ -504,10 +497,10 @@ jobs:
- name: Install Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: '3.9'
python-version: 3.9

- name: Build wheels
uses: pypa/cibuildwheel@d4a2945fcc8d13f20a1b99d461b8e844d5fc6e23 # v2.21.1
uses: pypa/cibuildwheel@9c00cb4f6b517705a3794b22395aedc36257242c # v3.2.1
env:
CIBW_BUILD: ${{ matrix.python }}
CIBW_ARCHS: ${{ matrix.arch }}
Expand All @@ -529,7 +522,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
id-token: write
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v3.0.') && github.repository == 'AcademySoftwareFoundation/OpenImageIO'
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'
steps:
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0

Expand Down
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"License :: OSI Approved :: Apache Software License",
"Topic :: Multimedia :: Graphics",
"Topic :: Multimedia :: Video",
Expand All @@ -32,7 +33,7 @@ classifiers = [
]
requires-python = ">= 3.9"
dependencies = [
"numpy>=1.19",
"numpy>=2.0,<3",
]

[project.urls]
Expand All @@ -51,7 +52,7 @@ oiiotool = "OpenImageIO:_command_line"
build-backend = "scikit_build_core.build"
requires = [
"scikit-build-core>=0.10.6,<1",
"pybind11>=2.13,<3",
"pybind11>=2.13,<4",
]

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

Expand Down
2 changes: 1 addition & 1 deletion src/build-scripts/build_ccache.bash
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ echo "HOME=$HOME"
echo "PWD=$PWD"
echo "ARCH=$ARCH"

CCACHE_PREBULT=${CCACHE_PREBULT:=1}
CCACHE_PREBUILT=${CCACHE_PREBUILT:=1}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh boy, that one is embarrassing


# Repo and branch/tag/commit of ccache to download if we don't have it yet
CCACHE_REPO=${CCACHE_REPO:=https://github.com/ccache/ccache}
Expand Down
10 changes: 5 additions & 5 deletions src/cmake/build_OpenColorIO.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
# OpenColorIO by hand!
######################################################################

set_cache (OpenColorIO_BUILD_VERSION 2.4.2 "OpenColorIO version for local builds")
set_cache (OpenColorIO_BUILD_VERSION 2.5.0 "OpenColorIO version for local builds")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like an orthogonal decision to anything to do with the wheels, because it will change the version of OCIO that anyone will get for the auto-builder. Are we confident enough in 2.5.0 to make it the default?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point -- I had only been considering that users locally pip-installing (building) OIIO would want the same OCIO behavior as the available prebuilt wheels. It totally skipped my mind that this affects the default auto-building behavior everywhere!

I am confident enough in 2.5.0 to make it the default, in terms of stuff not breaking; but I agree with you that this change is way out of scope for this PR! I'll revert it here, and open a new PR just for this sucker so we can further discuss.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like without a serious beta/RC cycle, OCIO is treating 2.5.0 as their release candidate and a future 2.5.1 as the one where stuff actually gets fixed. I think 2.5 hasn't actually had a chance to prove itself in production quite yet, so I'm cautious about making it the default. Anybody can override by setting either cmake or env variable OpenColorIO_BUILD_VERSION to 2.5.0, but the default should be playing it safe with a well-tested version we are 100% confident in.

Copy link
Collaborator Author

@zachlewis zachlewis Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thinking was that we'd want the version of OCIO available on pypi to match what the version of OIIO available on pypi was built against.

But I think that's a wise decision, to regard 2.5.0 as a release candidate, and I agree with you about holding off until 2.5.1 rolls out. Let's do that.

And if folks really want, they can locally build the OIIO bindings against OCIO 2.5 with:
$ pip install OpenImageIO --config-settings=cmake.define.OpenColorIO_BUILD_VERSION="2.5.0"

set (OpenColorIO_GIT_REPOSITORY "https://github.com/AcademySoftwareFoundation/OpenColorIO")
set (OpenColorIO_GIT_TAG "v${OpenColorIO_BUILD_VERSION}")
set_cache (OpenColorIO_BUILD_SHARED_LIBS OFF #ON
set_cache (OpenColorIO_BUILD_SHARED_LIBS OFF
DOC "Should a local OpenColorIO build, if necessary, build shared libraries" ADVANCED)
# We would prefer to build a static OCIO, but haven't figured out how to make
# it all work with the static dependencies, it just makes things complicated
Expand All @@ -24,9 +24,9 @@ unset (OPENCOLORIO_VERSION_MINOR)
unset (OpenColorIO_DIR)

checked_find_package(pystring VERSION_MIN 1.1.3)
checked_find_package(expat REQUIRED VERSION_MIN 2.5)
checked_find_package(yaml-cpp REQUIRED VERSION_MIN 0.6.0)
checked_find_package(minizip-ng REQUIRED VERSION_MIN 3.0.0)
checked_find_package(expat REQUIRED VERSION_MIN 2.6)
checked_find_package(yaml-cpp REQUIRED VERSION_MIN 0.8.0)
checked_find_package(minizip-ng REQUIRED VERSION_MIN 4.0.10)

string (MAKE_C_IDENTIFIER ${OpenColorIO_BUILD_VERSION} OpenColorIO_VERSION_IDENT)

Expand Down
2 changes: 1 addition & 1 deletion src/cmake/build_minizip-ng.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
######################################################################


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

Expand Down
2 changes: 1 addition & 1 deletion src/python/stubs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set (_stub_file "${CMAKE_SOURCE_DIR}/src/python/stubs/OpenImageIO/__init__.pyi")
# the version of python that OpenImageIO is being built against.
# Note: the version of cibuildwheel should be kept in sync with .github/workflows/wheel.yml
add_custom_command (COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/python/stubs/generate_stubs_local.py
--repo-root ${CMAKE_SOURCE_DIR} --python-version="3.11" --cibuildwheel-version="2.21.1"
--repo-root ${CMAKE_SOURCE_DIR} --python-version="3.11" --cibuildwheel-version="3.2.1"
--output-dir "${CMAKE_BINARY_DIR}/wheelhouse"
OUTPUT "${CMAKE_BINARY_DIR}/wheelhouse/OpenImageIO/__init__.pyi"
DEPENDS "${CMAKE_SOURCE_DIR}/src/python/stubs/generate_stubs.py"
Expand Down
Loading
Loading