From 2316dcf89c4976bbbcbf033694ffe4d978afd181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Achard?= Date: Thu, 12 Sep 2024 14:57:06 +0100 Subject: [PATCH 1/3] Python 3.13 wheels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémi Achard --- .github/workflows/wheel_workflow.yml | 45 ++++++++++++----------- pyproject.toml | 6 ++- setup.cfg | 1 + share/cmake/modules/FindExtPackages.cmake | 2 +- 4 files changed, 31 insertions(+), 23 deletions(-) diff --git a/.github/workflows/wheel_workflow.yml b/.github/workflows/wheel_workflow.yml index 76838cbb49..90343d19c8 100644 --- a/.github/workflows/wheel_workflow.yml +++ b/.github/workflows/wheel_workflow.yml @@ -81,10 +81,6 @@ jobs: # ------------------------------------------------------------------- # CPython 64 bits manylinux_2_28 # ------------------------------------------------------------------- - - build: CPython 3.7 64 bits manylinux_2_28 - manylinux: manylinux_2_28 - python: cp37-manylinux_x86_64 - arch: x86_64 - build: CPython 3.8 64 bits manylinux_2_28 manylinux: manylinux_2_28 python: cp38-manylinux_x86_64 @@ -105,13 +101,13 @@ jobs: manylinux: manylinux_2_28 python: cp312-manylinux_x86_64 arch: x86_64 + - build: CPython 3.13 64 bits manylinux_2_28 + manylinux: manylinux_2_28 + python: cp313-manylinux_x86_64 + arch: x86_64 # ------------------------------------------------------------------- # CPython 64 bits manylinux2014 # ------------------------------------------------------------------- - - build: CPython 3.7 64 bits manylinux2014 - manylinux: manylinux2014 - python: cp37-manylinux_x86_64 - arch: x86_64 - build: CPython 3.8 64 bits manylinux2014 manylinux: manylinux2014 python: cp38-manylinux_x86_64 @@ -132,13 +128,13 @@ jobs: manylinux: manylinux2014 python: cp312-manylinux_x86_64 arch: x86_64 + - build: CPython 3.13 64 bits manylinux2014 + manylinux: manylinux2014 + python: cp313-manylinux_x86_64 + arch: x86_64 # ------------------------------------------------------------------- # CPython ARM 64 bits manylinux2014 # ------------------------------------------------------------------- - - build: CPython 3.7 ARM 64 bits manylinux2014 - manylinux: manylinux2014 - python: cp37-manylinux_aarch64 - arch: aarch64 - build: CPython 3.8 ARM 64 bits manylinux2014 manylinux: manylinux2014 python: cp38-manylinux_aarch64 @@ -159,6 +155,10 @@ jobs: manylinux: manylinux2014 python: cp312-manylinux_aarch64 arch: aarch64 + - build: CPython 3.13 ARM 64 bits manylinux2014 + manylinux: manylinux2014 + python: cp313-manylinux_aarch64 + arch: aarch64 steps: - uses: actions/checkout@v4 @@ -174,7 +174,7 @@ jobs: platforms: all - name: Build wheels - uses: pypa/cibuildwheel@v2.16.5 + uses: pypa/cibuildwheel@v2.21.1 env: CIBW_BUILD: ${{ matrix.python }} CIBW_ARCHS: ${{ matrix.arch }} @@ -203,9 +203,6 @@ jobs: # ------------------------------------------------------------------- # CPython 64 bits # ------------------------------------------------------------------- - - build: CPython 3.7 64 bits - python: cp37-macosx_x86_64 - arch: x86_64 - build: CPython 3.8 64 bits python: cp38-macosx_x86_64 arch: x86_64 @@ -221,6 +218,9 @@ jobs: - build: CPython 3.12 64 bits python: cp312-macosx_x86_64 arch: x86_64 + - build: CPython 3.13 64 bits + python: cp313-macosx_x86_64 + arch: x86_64 # ------------------------------------------------------------------- # CPython ARM 64 bits # ------------------------------------------------------------------- @@ -239,6 +239,9 @@ jobs: - build: CPython 3.12 ARM 64 bits python: cp312-macosx_arm64 arch: arm64 + - build: CPython 3.13 ARM 64 bits + python: cp313-macosx_arm64 + arch: arm64 steps: - uses: actions/checkout@v4 @@ -249,7 +252,7 @@ jobs: python-version: '3.8' - name: Build wheels - uses: pypa/cibuildwheel@v2.16.5 + uses: pypa/cibuildwheel@v2.21.1 env: CIBW_BUILD: ${{ matrix.python }} CIBW_ARCHS: ${{ matrix.arch }} @@ -276,9 +279,6 @@ jobs: # ------------------------------------------------------------------- # CPython 64 bits # ------------------------------------------------------------------- - - build: CPython 3.7 64 bits - python: cp37-win_amd64 - arch: AMD64 - build: CPython 3.8 64 bits python: cp38-win_amd64 arch: AMD64 @@ -294,6 +294,9 @@ jobs: - build: CPython 3.12 64 bits python: cp312-win_amd64 arch: AMD64 + - build: CPython 3.13 64 bits + python: cp313-win_amd64 + arch: AMD64 steps: - uses: actions/checkout@v4 @@ -304,7 +307,7 @@ jobs: python-version: '3.8' - name: Build wheels - uses: pypa/cibuildwheel@v2.16.5 + uses: pypa/cibuildwheel@v2.21.1 env: CIBW_BUILD: ${{ matrix.python }} CIBW_ARCHS: ${{ matrix.arch }} diff --git a/pyproject.toml b/pyproject.toml index df4058a1c5..dbdb111ca5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,8 +30,12 @@ test-command = [ before-build = "share/ci/scripts/linux/yum/install_docs_env.sh" [tool.cibuildwheel.macos] +# cibuildwheel in some cases set this to 10.9 by default, OCIO needs >= 10.13 +environment = { MACOSX_DEPLOYMENT_TARGET="10.13" } before-build = "share/ci/scripts/macos/install_docs_env.sh" [tool.cibuildwheel.windows] -environment = { PATH="$GITHUB_WORKSPACE/doxygen;$PATH" } +# OCIO_PYTHON_LOAD_DLLS_FROM_PATH can cause segfaults in the current wheel workflow +# Disable for now as wheels are built with static dependencies. +environment = { PATH="$GITHUB_WORKSPACE/doxygen;$PATH", OCIO_PYTHON_LOAD_DLLS_FROM_PATH="0" } before-build = 'bash -c "share/ci/scripts/windows/install_docs_env.sh $GITHUB_WORKSPACE/doxygen"' diff --git a/setup.cfg b/setup.cfg index f53c6050c7..d5af16ae6f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -13,6 +13,7 @@ classifiers = Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 Programming Language :: Python :: 3.12 + Programming Language :: Python :: 3.13 Programming Language :: Python :: Implementation :: CPython Programming Language :: C++ description = OpenColorIO (OCIO) is a complete color management solution geared towards motion picture production with an emphasis on visual effects and computer animation. diff --git a/share/cmake/modules/FindExtPackages.cmake b/share/cmake/modules/FindExtPackages.cmake index 9b06319221..accdecec2a 100644 --- a/share/cmake/modules/FindExtPackages.cmake +++ b/share/cmake/modules/FindExtPackages.cmake @@ -179,7 +179,7 @@ if(OCIO_BUILD_PYTHON OR OCIO_BUILD_DOCS) # pybind11 2.9 fixes issues with MS Visual Studio 2022 (Debug). ocio_handle_dependency( pybind11 REQUIRED ALLOW_INSTALL MIN_VERSION 2.9.2 - RECOMMENDED_VERSION 2.11.1) + RECOMMENDED_VERSION 2.12.1) endif() endif() From c59dc27b1647e39c305e2669bed4be3efd8c7827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Achard?= Date: Sat, 21 Sep 2024 10:03:09 +0100 Subject: [PATCH 2/3] Build mac ARM wheels on Apple Silicon runners to enable testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémi Achard --- .github/workflows/wheel_workflow.yml | 40 +++++++++++++++++++++++++--- pyproject.toml | 1 + 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wheel_workflow.yml b/.github/workflows/wheel_workflow.yml index 90343d19c8..dc47408db4 100644 --- a/.github/workflows/wheel_workflow.yml +++ b/.github/workflows/wheel_workflow.yml @@ -166,7 +166,7 @@ jobs: - uses: actions/setup-python@v5 name: Install Python with: - python-version: '3.8' + python-version: '3.9' - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -221,6 +221,40 @@ jobs: - build: CPython 3.13 64 bits python: cp313-macosx_x86_64 arch: x86_64 + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + name: Install Python + with: + python-version: '3.9' + + - name: Build wheels + uses: pypa/cibuildwheel@v2.21.1 + env: + CIBW_BUILD: ${{ matrix.python }} + CIBW_ARCHS: ${{ matrix.arch }} + + - uses: actions/upload-artifact@v4 + with: + name: cibw-wheels-${{ matrix.python }} + path: ./wheelhouse/*.whl + + # --------------------------------------------------------------------------- + # macOS ARM Wheels + # --------------------------------------------------------------------------- + + macos-arm: + name: Build wheels on macOS ARM + runs-on: macos-14 + # Don't run on OCIO forks + if: | + github.event_name != 'schedule' || + github.repository == 'AcademySoftwareFoundation/OpenColorIO' + strategy: + matrix: + include: # ------------------------------------------------------------------- # CPython ARM 64 bits # ------------------------------------------------------------------- @@ -249,7 +283,7 @@ jobs: - uses: actions/setup-python@v5 name: Install Python with: - python-version: '3.8' + python-version: '3.9' - name: Build wheels uses: pypa/cibuildwheel@v2.21.1 @@ -304,7 +338,7 @@ jobs: - uses: actions/setup-python@v5 name: Install Python with: - python-version: '3.8' + python-version: '3.9' - name: Build wheels uses: pypa/cibuildwheel@v2.21.1 diff --git a/pyproject.toml b/pyproject.toml index dbdb111ca5..59de7e76ed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,6 +31,7 @@ before-build = "share/ci/scripts/linux/yum/install_docs_env.sh" [tool.cibuildwheel.macos] # cibuildwheel in some cases set this to 10.9 by default, OCIO needs >= 10.13 +# macOS ARM wheels needs 11.0, cibuildwheel will automatically bump where appropriate environment = { MACOSX_DEPLOYMENT_TARGET="10.13" } before-build = "share/ci/scripts/macos/install_docs_env.sh" From baa02134def7a6301967bffe05df287d31ed0907 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Achard?= Date: Sat, 21 Sep 2024 10:15:19 +0100 Subject: [PATCH 3/3] Fix upload_pypi job dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémi Achard --- .github/workflows/wheel_workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheel_workflow.yml b/.github/workflows/wheel_workflow.yml index dc47408db4..d940ac69a9 100644 --- a/.github/workflows/wheel_workflow.yml +++ b/.github/workflows/wheel_workflow.yml @@ -353,7 +353,7 @@ jobs: upload_pypi: - needs: [sdist, linux, macos, windows] + needs: [sdist, linux, macos, macos-arm, windows] runs-on: ubuntu-latest if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') steps: