Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,6 @@ jobs:
fail-fast: false
matrix:
include:
- container: quay.io/pypa/manylinux_2_28_x86_64:latest
python-version: '3.13t'
- container: quay.io/pypa/musllinux_1_2_x86_64:latest
python-version: '3.13t'
- container: quay.io/pypa/manylinux_2_28_x86_64:latest
python-version: '3.14t'
- container: quay.io/pypa/musllinux_1_2_x86_64:latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/reusable-standard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- uses: actions/checkout@v7

- name: Setup Python ${{ inputs.python-version }}
id: python
uses: actions/setup-python@v6
with:
python-version: ${{ inputs.python-version }}
Expand Down Expand Up @@ -67,13 +68,16 @@ jobs:
if: runner.os != 'Windows'
run: echo "CMAKE_GENERATOR=Ninja" >> "$GITHUB_ENV"

# FindPython's version scan can pick a different interpreter (e.g.
# Homebrew's 3.14 instead of setup-python's 3.14t), so pin it.
- name: Configure
run: >
cmake -S. -Bbuild -Werror=dev
-DPYBIND11_WERROR=ON
-DPYBIND11_PYTEST_ARGS=-v
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DPYTHON_EXECUTABLE=${{ steps.python.outputs.python-path }}
${{ inputs.cmake-args }}

- name: Build
Expand Down
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,16 @@ if(PYBIND11_MASTER_PROJECT)
set(Python_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/.venv")
endif()
endif()

# Python_ROOT_DIR is only a hint; a newer Python elsewhere on the system
# still wins the version scan, so pin the venv's interpreter directly.
if(DEFINED Python_ROOT_DIR AND NOT DEFINED Python_EXECUTABLE)
if(WIN32 AND EXISTS "${Python_ROOT_DIR}/Scripts/python.exe")
set(Python_EXECUTABLE "${Python_ROOT_DIR}/Scripts/python.exe")
elseif(EXISTS "${Python_ROOT_DIR}/bin/python")
set(Python_EXECUTABLE "${Python_ROOT_DIR}/bin/python")
endif()
endif()
endif()

set(PYBIND11_HEADERS
Expand Down
Loading