Skip to content

Commit 16a0ecb

Browse files
committed
docs: Correct the stale RHEL_BUILD rationale
The comment said RHEL_BUILD existed because pybind would otherwise pick up Python 3.6 in the RHEL base container, so PYBIND11_PYTHON_VERSION was set to force 3.12. That pin has been dropped from build.py -- pybind11 prefers the newest entry of its own Python_ADDITIONAL_VERSIONS list, and the manylinux base container puts a single interpreter first on PATH. RHEL_BUILD itself stays: it still selects the stub's link settings further down. Only the justification was wrong.
1 parent f5d7669 commit 16a0ecb

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

CMakeLists.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,15 @@ FetchContent_Declare(
9393
GIT_SHALLOW ON
9494
)
9595

96-
# RHEL base container has multiple version of Python installed. By default
97-
# it seems like pybind will pickup v3.6, so we specifically assign it to
98-
# search for 3.12 here.
96+
# Detect a RHEL-family build. Used further down to adjust how the stub
97+
# executable is linked.
98+
#
99+
# This used to also justify passing PYBIND11_PYTHON_VERSION, because pybind
100+
# would otherwise pick up an older interpreter present in the RHEL base
101+
# container. That is no longer needed: pybind11 prefers the newest entry of
102+
# its own Python_ADDITIONAL_VERSIONS list, and the manylinux base container
103+
# puts a single interpreter first on PATH. Set PYBIND11_PYTHON_VERSION
104+
# explicitly if a build ever has to target a specific version again.
99105
set(RHEL_BUILD OFF)
100106
if(LINUX)
101107
file(STRINGS "/etc/os-release" DISTRO_ID_LIKE REGEX "ID_LIKE")

0 commit comments

Comments
 (0)