Skip to content

Commit c509e0b

Browse files
committed
Build pybind11 3.1.0 in the scdv scripts
Both scdv scripts pinned pybind11 2.13.6, whose `eval.h` calls the `_Py_fopen_obj` that Python 3.14 deprecates. 3.1.0 calls `Py_fopen` from 3.14 on, so the deprecation is gone at the source rather than merely kept quiet by the `SYSTEM` include treatment. Ubuntu and Windows move together so an scdv built on either ships the same pybind11. scipy 1.17.1 declares a pre-emptive `pybind11<3.1.0` build bound, but its generated `requirements/build.txt` carries no upper bound and the build is driven with `--no-build-isolation`, so the bound does not apply and the compile is clean. Verified on Ubuntu 24.04 with Python 3.14.5: pybind11 3.1.0 installs into the scdv prefix through the same recipe, scipy 1.17.1 recompiles and runs against it, and solvcon builds with `-Werror` and passes 242 gtests and 2114 pytests.
1 parent 0922a01 commit c509e0b

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

contrib/dependency/build-scdv.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -293,9 +293,9 @@ EOF
293293

294294
plat_scipy_install() {
295295
# Runs in the unpacked scipy source directory (the caller has pushd'd).
296-
# Ubuntu's pybind11-dev (2.11) at /usr/include shadows our 2.13.6 and
297-
# rejects scipy's 3-arg PYBIND11_MODULE. -isystem orders our headers ahead
298-
# of /usr/include so scipy compiles against the right pybind11.
296+
# Ubuntu's pybind11-dev (2.11) at /usr/include shadows ours and rejects
297+
# scipy's 3-arg PYBIND11_MODULE. -isystem orders our headers ahead of
298+
# /usr/include so scipy compiles against the right pybind11.
299299
local saved_cxxflags=${CXXFLAGS:-}
300300
export CXXFLAGS="-isystem ${SCDV_USRDIR}/include ${saved_cxxflags}"
301301
with_log install.log "${PY}" -m pip install . --no-build-isolation
@@ -1277,11 +1277,11 @@ build_python() {
12771277

12781278
build_pybind11() {
12791279
scdv_skip_p pybind11 && { echo "skip: pybind11" ; return 0 ; }
1280-
local ver=2.13.6 full fn
1280+
local ver=3.1.0 full fn
12811281
full=pybind11-${ver} ; fn=${full}.tar.gz
12821282
download_md5 "${fn}" \
12831283
"https://github.com/pybind/pybind11/archive/refs/tags/v${ver}.tar.gz" \
1284-
a04dead9c83edae6d84e2e343da7feeb
1284+
235664b4673257b80a9ab79f9b208e94
12851285
unpack "${fn}" "${full}"
12861286
mkdir -p "${SCDV_SRCDIR}/${full}/build"
12871287
pushd "${SCDV_SRCDIR}/${full}/build" > /dev/null

contrib/dependency/windows/build-scdv-windows.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -917,10 +917,10 @@ function Build-Python {
917917

918918
function Build-Pybind11 {
919919
if (Test-Skip 'pybind11') { Write-Host 'skip: pybind11'; return }
920-
$ver = '2.13.6'; $full = "pybind11-$ver"; $fn = "$full.tar.gz"
920+
$ver = '3.1.0'; $full = "pybind11-$ver"; $fn = "$full.tar.gz"
921921
Get-Download $fn `
922922
"https://github.com/pybind/pybind11/archive/refs/tags/v$ver.tar.gz" `
923-
'a04dead9c83edae6d84e2e343da7feeb'
923+
'235664b4673257b80a9ab79f9b208e94'
924924
Expand-Source $fn $full
925925
$bld = Join-Path $ScdvSrcDir "$full\build"
926926
New-Item -ItemType Directory -Force -Path $bld | Out-Null

0 commit comments

Comments
 (0)