Skip to content

fix(ci): pin Python discovery to the intended interpreter#6105

Open
henryiii wants to merge 1 commit into
pybind:masterfrom
henryiii:henryiii/fix/ci-freethreaded
Open

fix(ci): pin Python discovery to the intended interpreter#6105
henryiii wants to merge 1 commit into
pybind:masterfrom
henryiii:henryiii/fix/ci-freethreaded

Conversation

@henryiii

Copy link
Copy Markdown
Collaborator

🤖 AI text below 🤖

Description

CI has been red since the manylinux/musllinux images added Python 3.15 and dropped 3.13t, and the same runner refresh broke the free-threaded jobs on macOS and Windows:

  • In the manylinux jobs, uv creates the requested venv, but Python_ROOT_DIR is only a hint: FindPython's version scan tries 3.15 first and finds /usr/local/bin/python3.15 on PATH before considering the venv's older interpreter. All four jobs then built against 3.15 and failed at the pytest step (No module named pytest).
  • In the standard macOS/Windows 3.14t jobs, FindPython picked a system GIL 3.14 (e.g. Homebrew's framework build) instead of setup-python's free-threaded interpreter.

Fixes:

  • CMakeLists.txt: when the venv machinery sets Python_ROOT_DIR, also pin Python_EXECUTABLE to the venv's interpreter, making discovery exact instead of heuristic.
  • reusable-standard.yml: pass setup-python's interpreter to CMake as -DPYTHON_EXECUTABLE (works in both old and new FindPython modes).
  • ci.yml: drop the 3.13t manylinux rows; the images no longer ship 3.13t, and 3.14t rows already exist.

Suggested changelog entry:

The manylinux/musllinux images added Python 3.15 and dropped 3.13t;
FindPython's version scan then picked /usr/local/bin/python3.15 over
the uv-created venv (Python_ROOT_DIR is only a hint). Similarly, the
macOS and Windows 3.14t jobs picked a system 3.14 over setup-python's
free-threaded interpreter. Pin the interpreter explicitly in both
places, and drop the 3.13t manylinux jobs.

Assisted-by: ClaudeCode:claude-fable-5
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.

1 participant