From eec9028c2bcccb1994722aa04c1d3e6257d120a0 Mon Sep 17 00:00:00 2001 From: MilesCranmerBot Date: Tue, 13 Oct 2026 16:21:19 +0100 Subject: [PATCH 1/2] [3.12] libpython: drop the unused C++ compiler Backport of #950. The shared library links no C++ runtime (libpython3.12.so.1.0 needs only libc, libm, libpthread, libdl and libutil), but the compiler's run-exports made every libpython build require libstdcxx >=15 on Linux and libcxx on macOS. Because python pins libpython exactly, environments capped below libstdcxx 15 (e.g. Julia 1.10 and 1.12 via CondaPkg) cannot install current python 3.12 builds. Co-authored-by: Miles Cranmer --- recipe/meta.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 19ee9cbf6..6e8d0d6db 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -4,7 +4,7 @@ {% set ver2 = '.'.join(version.split('.')[0:2]) %} {% set ver2nd = ''.join(version.split('.')[0:2]) %} {% set ver3nd = ''.join(version.split('.')[0:3]) %} -{% set build_number = 1 %} +{% set build_number = 2 %} # this makes the linter happy {% set channel_targets = channel_targets or 'conda-forge main' %} @@ -310,7 +310,6 @@ outputs: build: - {{ stdlib('c') }} - {{ compiler('c') }} - - {{ compiler('cxx') }} test: commands: - VER=${PKG_VERSION%.*} # [not win] From 1ead995ee0303f279d78c6d837fcb23c8e1237af Mon Sep 17 00:00:00 2001 From: MilesCranmerBot Date: Tue, 13 Oct 2026 16:21:19 +0100 Subject: [PATCH 2/2] [3.12] libpython: create $PREFIX/lib before copying the library libpython has no host requirements on this branch, so on macOS the host prefix was only populated through the C++ compiler's libcxx run-export. Without it, lib/ does not exist and cp fails (as seen on #950). Co-authored-by: Miles Cranmer --- recipe/install_shared.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/recipe/install_shared.sh b/recipe/install_shared.sh index 5dafbd13f..3a3323fa3 100644 --- a/recipe/install_shared.sh +++ b/recipe/install_shared.sh @@ -22,6 +22,7 @@ VERABI_NO_DBG=${VER}${THREAD} # Install the shared library (for people who embed Python only, e.g. GDB). # Linking module extensions to this on Linux is redundant (but harmless). # Linking module extensions to this on Darwin is harmful (multiply defined symbols). +mkdir -p ${PREFIX}/lib shopt -s extglob cp -pf ${_buildd_shared}/libpython*${SHLIB_EXT}!(.lto) ${PREFIX}/lib/ shopt -u extglob