Skip to content

build: Fix Windows Debug OTIO pip build (cmake 4.4.1+ FindPython, python311_d.lib) - #1376

Merged
cedrik-fuoco-adsk merged 2 commits into
AcademySoftwareFoundation:mainfrom
cedrik-fuoco-adsk:ci-fix-windows-debug-due-to-cmake
Aug 28, 2026
Merged

cedrik-fuoco-adsk merged 2 commits into
AcademySoftwareFoundation:mainfrom
cedrik-fuoco-adsk:ci-fix-windows-debug-due-to-cmake

Conversation

@cedrik-fuoco-adsk

@cedrik-fuoco-adsk cedrik-fuoco-adsk commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

build: Fix Windows Debug OTIO pip build (cmake 4.4.1+ FindPython, python311_d.lib)

Linked issues

none

Summarize your change

Fix Windows Debug CI failures when pip builds OpenTimelineIO against our custom debug Python.
Two changes in cmake/dependencies/python3.cmake and a new src/build/pip-build-constraints.txt:

  1. Pin cmake in pip build-isolation: OTIO's setup.py runs find_package(Python Development.Module) using the cmake wheel pip installs into its isolated build env, not the cmake driving the outer OpenRV build. CMake 4.4.1+ changed Windows FindPython to prefer release-only ABI by default, which breaks against our debug artifacts (python311_d.lib, python_d.exe). Pin cmake==3.31.6 (same line as the outer build) via PIP_CONSTRAINT and PIP_BUILD_CONSTRAINT.
  2. Prepend LIB on Windows Debug: Even with FindPython fixed, OTIO's debug Python headers #pragma-link python311_d.lib. Pip builds under D:/_t/..., so MSVC cannot find our import library without prepending the Python libs directory to LIB during the pip install step (using cmake -E env --modify, same pattern as the existing PATH fix).
    Release builds are unaffected.

Describe the reason for the change

Windows Debug jobs have failed on every nightly since 2026-08-05 with no OpenRV source change. Two nightlies of the same commit straddle the boundary: Aug 4 passed, Aug 5 failed. cmake 4.4.2 was published to PyPI on 2026-08-04, between those runs.

@cedrik-fuoco-adsk
cedrik-fuoco-adsk force-pushed the ci-fix-windows-debug-due-to-cmake branch from dd916cf to 8b29f63 Compare August 27, 2026 14:29
CMake 4.4.1 changed Windows FindPython ABI handling to release-only by
default, breaking OpenTimelineIO's pip-time find_package(Python
Development.Module) against our custom debug Python artifacts
(python311_d.lib, python_d.exe).

Pin cmake to 3.31.6 in pip-build-constraints.txt and export it via
PIP_CONSTRAINT and PIP_BUILD_CONSTRAINT so OTIO's build-isolation
environment does not pull in the incompatible CMake version. OTIO's C++
extensions still compile against debug Python headers, which
#pragma-link python311_d.lib; prepend our Python libs directory to LIB
during pip install so MSVC finds the debug import library when pip
builds under D:/_t/...

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
@cedrik-fuoco-adsk
cedrik-fuoco-adsk force-pushed the ci-fix-windows-debug-due-to-cmake branch from 9dd2677 to 2c4ac4d Compare August 27, 2026 20:01
cedrik-fuoco-adsk added a commit to cedrik-fuoco-adsk/OpenRV that referenced this pull request Aug 27, 2026
Align pip constraint file naming with main (AcademySoftwareFoundation#1376), which adds
src/build/pip-build-constraints.txt for the Windows Debug OTIO fix.
The CY2026 numpy/Cython pins stay in the .in template and generate
${CMAKE_BINARY_DIR}/pip-build-constraints.txt at configure time.

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
@cedrik-fuoco-adsk cedrik-fuoco-adsk changed the title fix: Pin pip build-isolation cmake to 4.4.0 for the OTIO wheel build build: Fix Windows Debug OTIO pip build (cmake 4.4.1+ FindPython, python311_d.lib) Aug 27, 2026
@cedrik-fuoco-adsk
cedrik-fuoco-adsk marked this pull request as ready for review August 27, 2026 20:14

@bernie-laberge bernie-laberge left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@eloisebrosseau eloisebrosseau left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What is the purpose of this new pip-build-constraints.txt?

@cedrik-fuoco-adsk

Copy link
Copy Markdown
Contributor Author

It pins the versions pip is allowed to resolve inside the build-isolation environments (PEP 517) that pip creates when it builds a package from source.

When a package installed through requirements.txt is built from source, pip resolves that package's build requirements (cmake, in this case) in a separate isolated environment that doesn't inherit our requirements.txt pins. The constraints file is what pins those. @eloisebrosseau

@cedrik-fuoco-adsk
cedrik-fuoco-adsk merged commit 515073f into AcademySoftwareFoundation:main Aug 28, 2026
22 checks passed
cedrik-fuoco-adsk added a commit to cedrik-fuoco-adsk/OpenRV that referenced this pull request Aug 28, 2026
…-6-8

Resolve cmake/dependencies/python3.cmake: keep this branch's templated
pip-build-constraints.txt (generated into CMAKE_BINARY_DIR from
src/build/pip-build-constraints.txt.in) instead of main's static
src/build/pip-build-constraints.txt, and fold main's cmake==3.31.6 pin
into the template so the Windows Debug OTIO FindPython fix (AcademySoftwareFoundation#1376) is
preserved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants