From be7de471cd53e8c59daa78341ff2946b19f1180c Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Wed, 26 Nov 2025 20:08:03 +0100 Subject: [PATCH 01/10] Expand OpenSSL version check --- recipe/meta.yaml | 3 +++ recipe/run_test.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 51a1afcb2..2dc855287 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -210,6 +210,9 @@ outputs: - ripgrep - cmake - ninja + # Pin to the openssl version used during the build to check whether + # we load the conda-forge version. + - openssl {{ openssl }} - {{ stdlib('c') }} - {{ compiler('c') }} # Tried to use enable_language(C) to avoid needing this. It does not work. diff --git a/recipe/run_test.py b/recipe/run_test.py index bbe13e465..33be79209 100644 --- a/recipe/run_test.py +++ b/recipe/run_test.py @@ -102,8 +102,8 @@ import ssl print('OPENSSL_VERSION:', ssl.OPENSSL_VERSION) -CONDA_OPENSSL_VERSION = os.getenv('openssl').split(".")[0] -assert CONDA_OPENSSL_VERSION in ssl.OPENSSL_VERSION +CONDA_OPENSSL_VERSION = os.getenv('openssl') +assert CONDA_OPENSSL_VERSION in ssl.OPENSSL_VERSION, f"{CONDA_OPENSSL_VERSION} not found in {ssl.OPENSSL_VERSION}" # See https://github.com/conda-forge/python-feedstock/issues/718 for context: assert sys.hash_info.algorithm.startswith("siphash") From ab9c4dfa624d92c691e1cde66c8467e778d624bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Thu, 22 Jan 2026 15:59:51 +0100 Subject: [PATCH 02/10] Split shared Python library to `libpython` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #843 Signed-off-by: Michał Górny --- recipe/build_base.sh | 10 --- recipe/build_shared.bat | 0 recipe/build_shared.sh | 33 +++++++ recipe/meta.yaml | 87 ++++++++++++++++--- recipe/tests/cmake/CMakeLists.txt | 14 +-- .../prefix-replacement/build-and-test.sh | 77 ++++++++-------- 6 files changed, 150 insertions(+), 71 deletions(-) create mode 100644 recipe/build_shared.bat create mode 100644 recipe/build_shared.sh diff --git a/recipe/build_base.sh b/recipe/build_base.sh index dd5c15555..e52c83735 100644 --- a/recipe/build_base.sh +++ b/recipe/build_base.sh @@ -385,15 +385,6 @@ if [[ ${_OPTIMIZED} == yes ]]; then _FLAGS_REPLACE+=("") done fi -# 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). -shopt -s extglob -cp -pf ${_buildd_shared}/libpython*${SHLIB_EXT}!(.lto) ${PREFIX}/lib/ -shopt -u extglob -if [[ ${target_platform} =~ .*linux.* ]]; then - ln -sf ${PREFIX}/lib/libpython${VERABI}${SHLIB_EXT}.1.0 ${PREFIX}/lib/libpython${VERABI}${SHLIB_EXT} -fi SYSCONFIG=$(find ${_buildd_static}/$(cat ${_buildd_static}/pybuilddir.txt) -name "_sysconfigdata*.py" -print0) cat ${SYSCONFIG} | ${SYS_PYTHON} "${RECIPE_DIR}"/replace-word-pairs.py \ @@ -517,7 +508,6 @@ rm ${PREFIX}/lib/libpython${VERABI}.a if [[ ${PY_INTERP_DEBUG} == yes ]]; then rm ${PREFIX}/bin/python${VER} ln -s ${PREFIX}/bin/python${VERABI} ${PREFIX}/bin/python${VER} - ln -s ${PREFIX}/lib/libpython${VERABI}${SHLIB_EXT} ${PREFIX}/lib/libpython${VERABI_NO_DBG}${SHLIB_EXT} ln -s ${PREFIX}/include/python${VERABI} ${PREFIX}/include/python${VER} fi diff --git a/recipe/build_shared.bat b/recipe/build_shared.bat new file mode 100644 index 000000000..e69de29bb diff --git a/recipe/build_shared.sh b/recipe/build_shared.sh new file mode 100644 index 000000000..35812a5d1 --- /dev/null +++ b/recipe/build_shared.sh @@ -0,0 +1,33 @@ +#!/bin/bash +set -ex + +_buildd_shared=build-shared +if [[ ${PY_INTERP_DEBUG} == yes ]]; then + DBG=d +else + DBG= +fi +if [[ ${PY_FREETHREADING} == yes ]]; then + # This Python will not be usable with non-free threading Python modules. + THREAD=t +else + THREAD= +fi + +VER=${PKG_VERSION%.*} +ABIFLAGS=${DBG}${THREAD} +VERABI=${VER}${THREAD}${DBG} +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). +shopt -s extglob +cp -pf ${_buildd_shared}/libpython*${SHLIB_EXT}!(.lto) ${PREFIX}/lib/ +shopt -u extglob +if [[ ${target_platform} =~ .*linux.* ]]; then + ln -sf ${PREFIX}/lib/libpython${VERABI}${SHLIB_EXT}.1.0 ${PREFIX}/lib/libpython${VERABI}${SHLIB_EXT} +fi +if [[ ${PY_INTERP_DEBUG} == yes ]]; then + ln -s ${PREFIX}/lib/libpython${VERABI}${SHLIB_EXT} ${PREFIX}/lib/libpython${VERABI_NO_DBG}${SHLIB_EXT} +fi diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 2dc855287..b58c39ed7 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -222,7 +222,6 @@ outputs: files: - tests/cmake/* - tests/cython/* - - tests/prefix-replacement/* - run_test.py commands: - echo on # [win] @@ -248,8 +247,11 @@ outputs: - _CONDA_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_x86_64_conda_linux_gnu python -c "import sysconfig; print(sysconfig.get_config_var('CC'))" # [linux64] # check for unreplaced @ symbols in sysconfig files, excluding e.g. '"$@".lto' - for f in ${CONDA_PREFIX}/lib/python*/_sysconfig*.py; do echo "Checking $f:"; if [[ `rg @[^@]*@ $f` ]]; then echo "FAILED ON $f"; cat $f; exit 1; fi; done # [linux64 or osx] - - test ! -f ${PREFIX}/lib/libpython${PKG_VERSION%.*}.a # [unix] - - test ! -f ${PREFIX}/lib/libpython${PKG_VERSION%.*}.nolto.a # [unix] + - test ! -f ${PREFIX}/lib/libpython${PKG_VERSION%.*}.so # [unix] + - test ! -f ${PREFIX}/lib/libpython${PKG_VERSION%.*}.a # [unix] + - test ! -f ${PREFIX}/lib/libpython${PKG_VERSION%.*}.so # [linux] + - test ! -f ${PREFIX}/lib/libpython${PKG_VERSION%.*}.dylib # [osx] + - test ! -f ${PREFIX}/lib/libpython${PKG_VERSION%.*}.nolto.a # [unix] {% if freethreading == "yes" %} - if not exist %PREFIX%\\libs\\python3t.lib exit 1 # [win] - if not exist %PREFIX%\\libs\\python{{ ver2nd }}t.lib exit 1 # [win] @@ -266,14 +268,8 @@ outputs: - if not exist %PREFIX%\\Scripts\\pydoc.exe exit 1 # [win] - if not exist %PREFIX%\\include\\pyconfig.h exit 1 # [win] - pushd tests - - pushd prefix-replacement # [unix] - - bash build-and-test.sh # [unix] - - popd # [unix] - pushd cmake -{% if freethreading == "no" %} - # TODO: use the new FindPython3 which supports freethreading - - cmake -GNinja -DPY_VER={{ version }} --debug-find --trace --debug-output --debug-trycompile . -{% endif %} + - cmake -GNinja -DPY_VER={{ version }} -DEXTRA_COMPONENTS="Development.Module" --debug-find --trace --debug-output --debug-trycompile . - popd - popd - python run_test.py @@ -284,6 +280,61 @@ outputs: # Test for wide character supported via ncursesw - TERM=xterm >/dev/null python -c "import curses; scr = curses.initscr(); curses.unget_wch('x'); assert 'x' == scr.get_wch()" # [unix] + - name: libpython + script: build_shared.sh # [unix] + script: build_shared.bat # [win] + build: + number: {{ build_number }} + activate_in_script: true + ignore_run_exports: + - python_abi + script_env: + - PY_INTERP_DEBUG={{ py_interp_debug }} + - PY_FREETHREADING={{ freethreading }} + string: h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}{{ debug }}_{{ abi_tag }} + requirements: + build: + - {{ compiler('c') }} + - {{ stdlib('c') }} + - {{ compiler('cxx') }} + host: + - {{ pin_subpackage('python', exact=True) }} + run: + - {{ pin_subpackage('python', exact=True) }} + test: + files: + - tests/cmake/* + - tests/prefix-replacement/* + requires: + - {{ stdlib('c') }} + - {{ compiler('c') }} + # cmake expects a C++ compiler for some reason + - {{ compiler('cxx') }} + - ripgrep + - cmake + - ninja + commands: + - VER=${PKG_VERSION%.*} # [not win] + - VERABI=${VER} # [not win] +{% if freethreading == "yes" %} + - VERABI=${VERABI}t # [not win] +{% endif %} + - VERABI_NO_DBG=${VERABI} # [not win] +{% if py_interp_debug == "yes" %} + - VERABI=${VERABI}d # [not win] +{% endif %} + - test -f ${PREFIX}/lib/libpython${VERABI}.so # [linux] + - test -f ${PREFIX}/lib/libpython3.so # [linux and build_type == "release"] + - test -f ${PREFIX}/lib/libpython${VERABI}.dylib # [osx] + - pushd tests + - pushd prefix-replacement # [unix] + - bash build-and-test.sh # [unix] + - popd # [unix] + - pushd cmake + - cmake -GNinja -DPY_VER={{ version }} -DEXTRA_COMPONENTS="Development.Embed" --debug-find --trace --debug-output --debug-trycompile . + - popd + - popd + - name: libpython-static script: build_static.sh # [unix] script: build_static.bat # [win] @@ -307,11 +358,16 @@ outputs: - {{ pin_subpackage('python', exact=True) }} test: files: + - tests/cmake/* - tests/prefix-replacement/* requires: - {{ stdlib('c') }} - {{ compiler('c') }} + # cmake expects a C++ compiler for some reason + - {{ compiler('cxx') }} - ripgrep + - cmake + - ninja commands: - VER=${PKG_VERSION%.*} # [not win] - VERABI=${VER} # [not win] @@ -325,9 +381,14 @@ outputs: - test -f ${PREFIX}/lib/libpython${VERABI}.a # [unix] - test -f ${PREFIX}/lib/libpython${VERABI_NO_DBG}.nolto.a # [unix] - test -f ${PREFIX}/lib/python${VERABI_NO_DBG}/config-${VERABI}-darwin/libpython${VERABI}.a # [osx] - - pushd tests/prefix-replacement # [unix] - - bash build-and-test.sh # [unix] - - popd # [unix] + - pushd tests + - pushd prefix-replacement # [unix] + - bash build-and-test.sh # [unix] + - popd # [unix] + - pushd cmake + - cmake -GNinja -DPY_VER={{ version }} -DEXTRA_COMPONENTS="Development.Embed" --debug-find --trace --debug-output --debug-trycompile . + - popd + - popd - name: cpython build: diff --git a/recipe/tests/cmake/CMakeLists.txt b/recipe/tests/cmake/CMakeLists.txt index a13e20ae1..f3e41560c 100644 --- a/recipe/tests/cmake/CMakeLists.txt +++ b/recipe/tests/cmake/CMakeLists.txt @@ -1,16 +1,10 @@ -# https://martinopilia.com/posts/2018/09/15/building-python-extension.html -# FindPythonInterp and FindPythonLibs are deprecated since cmake 3.12 -# These can be replaced by find_package(Python ${PY_VER} REQUIRED) -# But these are still used by other packages, so we keep them. +# https://scikit-build-core.readthedocs.io/en/latest/guide/cmakelists.html#finding-python cmake_minimum_required(VERSION 3.10) enable_language(C) project(mymath) -option(PY_VER, "Python version to use") +option(PY_VER "Python version to use") +option(EXTRA_COMPONENTS "Additional Python components to check for") -find_package(PythonInterp ${PY_VER} REQUIRED) -# PATHS $ENV{CONDA_PREFIX} - -# This goes after, since it uses PythonInterp as hint -find_package(PythonLibs ${PY_VER} REQUIRED) +find_package(Python ${PY_VER} COMPONENTS Interpreter ${EXTRA_COMPONENTS} REQUIRED) diff --git a/recipe/tests/prefix-replacement/build-and-test.sh b/recipe/tests/prefix-replacement/build-and-test.sh index 633b741a3..d710bde75 100644 --- a/recipe/tests/prefix-replacement/build-and-test.sh +++ b/recipe/tests/prefix-replacement/build-and-test.sh @@ -2,46 +2,47 @@ set -ex -if [[ "$PKG_NAME" == "libpython-static" ]]; then - # see bpo44182 for why -L${CONDA_PREFIX}/lib is added - ${CC} a.c $(python3-config --cflags) $(python3-config --embed --ldflags) -L${CONDA_PREFIX}/lib -o ${CONDA_PREFIX}/bin/embedded-python-static - if [[ "$target_platform" == linux-* ]]; then - if ${READELF} -d ${CONDA_PREFIX}/bin/embedded-python-static | rg libpython; then - echo "ERROR :: Embedded python linked to shared python library. It is expected to link to the static library." - fi - elif [[ "$target_platform" == osx-* ]]; then - if ${OTOOL} -l ${CONDA_PREFIX}/bin/embedded-python-static | rg libpython; then - echo "ERROR :: Embedded python linked to shared python library. It is expected to link to the static library." - fi - fi - ${CONDA_PREFIX}/bin/embedded-python-static - - # I thought this would prefer the shared library for Python. I was wrong: - # EMBED_LDFLAGS=$(python3-config --ldflags) - # re='^(.*)(-lpython[^ ]*)(.*)$' - # if [[ ${EMBED_LDFLAGS} =~ $re ]]; then - # EMBED_LDFLAGS="${BASH_REMATCH[1]} ${BASH_REMATCH[3]} -Wl,-Bdynamic ${BASH_REMATCH[2]}" - # fi - # ${CC} a.c $(python3-config --cflags) ${EMBED_LDFLAGS} -o ${CONDA_PREFIX}/bin/embedded-python-shared +case ${PKG_NAME} in + libpython) + # see bpo44182 for why -L${CONDA_PREFIX}/lib is added + ${CC} a.c $(python3-config --cflags) \ + $(python3-config --embed --ldflags) \ + -L${CONDA_PREFIX}/lib -Wl,-rpath,${CONDA_PREFIX}/lib \ + -o ${CONDA_PREFIX}/bin/embedded-python-shared - # Brute-force way of linking to the shared library, sorry! - rm -rf ${CONDA_PREFIX}/lib/libpython*.a -fi + if [[ "$target_platform" == linux-* ]]; then + if ! ${READELF} -d ${CONDA_PREFIX}/bin/embedded-python-shared | rg libpython; then + echo "ERROR :: Embedded python linked to static python library. We tried to force it to use the shared library." + fi + elif [[ "$target_platform" == osx-* ]]; then + if ! ${OTOOL} -l ${CONDA_PREFIX}/bin/embedded-python-shared | rg libpython; then + echo "ERROR :: Embedded python linked to static python library. We tried to force it to use the shared library." + fi + fi + ${CONDA_PREFIX}/bin/embedded-python-shared + ;; -${CC} a.c $(python3-config --cflags) \ - $(python3-config --embed --ldflags) \ - -L${CONDA_PREFIX}/lib -Wl,-rpath,${CONDA_PREFIX}/lib \ - -o ${CONDA_PREFIX}/bin/embedded-python-shared + libpython-static) + ${CC} a.c $(python3-config --cflags) \ + $(python3-config --embed --ldflags) \ + -L${CONDA_PREFIX}/lib -Wl,-rpath,${CONDA_PREFIX}/lib \ + -o ${CONDA_PREFIX}/bin/embedded-python-static + if [[ "$target_platform" == linux-* ]]; then + if ${READELF} -d ${CONDA_PREFIX}/bin/embedded-python-static | rg libpython; then + echo "ERROR :: Embedded python linked to shared python library. It is expected to link to the static library." + fi + elif [[ "$target_platform" == osx-* ]]; then + if ${OTOOL} -l ${CONDA_PREFIX}/bin/embedded-python-static | rg libpython; then + echo "ERROR :: Embedded python linked to shared python library. It is expected to link to the static library." + fi + fi + ${CONDA_PREFIX}/bin/embedded-python-static + ;; -if [[ "$target_platform" == linux-* ]]; then - if ! ${READELF} -d ${CONDA_PREFIX}/bin/embedded-python-shared | rg libpython; then - echo "ERROR :: Embedded python linked to static python library. We tried to force it to use the shared library." - fi -elif [[ "$target_platform" == osx-* ]]; then - if ! ${OTOOL} -l ${CONDA_PREFIX}/bin/embedded-python-shared | rg libpython; then - echo "ERROR :: Embedded python linked to static python library. We tried to force it to use the shared library." - fi -fi -${CONDA_PREFIX}/bin/embedded-python-shared + *) + # invalid package + exit 1 + ;; +esac set +x From 07c920642768904686c977ba99463d674466fa44 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 9 Aug 2026 15:22:01 +1100 Subject: [PATCH 03/10] add `-DCMAKE_POLICY_DEFAULT_CMP0094=NEW` to CMake tests --- recipe/meta.yaml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index b58c39ed7..06c9d05f3 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -39,6 +39,15 @@ {% set site_packages_path = "lib/python" + ver2 + "/site-packages" %} {% endif %} +{% set cmake_test_args = "" %} +{% if unix %} + # for CMake invocations during testing, we need to avoid accidentally picking up python versions from + # the image, but we don't want to use `${CMAKE_ARGS}` from the compiler activation, because that contains + # `CMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER`; while that's useful for building (i.e. don't look in `host:`, + # because we want to use binaries from `build:`), we want the exact opposite when running tests. + {% set cmake_test_args="-DCMAKE_POLICY_DEFAULT_CMP0094=NEW -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=ONLY -DCMAKE_FIND_ROOT_PATH=${PREFIX}" %} +{% endif %} + package: name: python-split version: {{ version }}{{ dev }} @@ -269,7 +278,7 @@ outputs: - if not exist %PREFIX%\\include\\pyconfig.h exit 1 # [win] - pushd tests - pushd cmake - - cmake -GNinja -DPY_VER={{ version }} -DEXTRA_COMPONENTS="Development.Module" --debug-find --trace --debug-output --debug-trycompile . + - cmake -GNinja {{ cmake_test_args }} -DPY_VER={{ version }} -DEXTRA_COMPONENTS="Development.Module" --debug-find --trace --debug-output --debug-trycompile . - popd - popd - python run_test.py @@ -331,7 +340,7 @@ outputs: - bash build-and-test.sh # [unix] - popd # [unix] - pushd cmake - - cmake -GNinja -DPY_VER={{ version }} -DEXTRA_COMPONENTS="Development.Embed" --debug-find --trace --debug-output --debug-trycompile . + - cmake -GNinja {{ cmake_test_args }} -DPY_VER={{ version }} -DEXTRA_COMPONENTS="Development.Embed" --debug-find --trace --debug-output --debug-trycompile . - popd - popd @@ -386,7 +395,7 @@ outputs: - bash build-and-test.sh # [unix] - popd # [unix] - pushd cmake - - cmake -GNinja -DPY_VER={{ version }} -DEXTRA_COMPONENTS="Development.Embed" --debug-find --trace --debug-output --debug-trycompile . + - cmake -GNinja {{ cmake_test_args }} -DPY_VER={{ version }} -DEXTRA_COMPONENTS="Development.Embed" --debug-find --trace --debug-output --debug-trycompile . - popd - popd From 3bcd01d74b7ad90dfb395ee340f5f6c6ce66c016 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 9 Aug 2026 16:16:06 +1100 Subject: [PATCH 04/10] tell CMake to accept the debug/freethreading ABI --- recipe/meta.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 06c9d05f3..d7c5e0ccd 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -46,6 +46,10 @@ # `CMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER`; while that's useful for building (i.e. don't look in `host:`, # because we want to use binaries from `build:`), we want the exact opposite when running tests. {% set cmake_test_args="-DCMAKE_POLICY_DEFAULT_CMP0094=NEW -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=ONLY -DCMAKE_FIND_ROOT_PATH=${PREFIX}" %} + # CMake needs to be told that the debug/freethreading ABI is fine; the option takes a 4-tuple, + # Python_FIND_ABI=;;;; for details see + # https://cmake.org/cmake/help/latest/module/FindPython.html#hints + {% set cmake_test_args=cmake_test_args ~ " -DPython_FIND_ABI=\"" ~ ("ON" if build_type == "debug" else "OFF") ~ ";ANY;ANY;" ~ ("ON" if freethreading == "yes" else "OFF") ~ "\"" %} {% endif %} package: From 6bf953fde0daefc0ab425a062fb22331b34c66a9 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 9 Aug 2026 16:21:44 +1100 Subject: [PATCH 05/10] don't store build artifacts by default --- conda-forge.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/conda-forge.yml b/conda-forge.yml index 3a6ca1f90..3b7509423 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -17,6 +17,3 @@ provider: linux_aarch64: default osx_arm64: default test: native_and_emulated -workflow_settings: - store_build_artifacts: - - value: true From a35be725106a07b10ca17168164a4785e71afc9a Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 9 Aug 2026 19:13:02 +1100 Subject: [PATCH 06/10] bump build number --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index d7c5e0ccd..0c5ec0de6 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 = 2 %} +{% set build_number = 3 %} # this makes the linter happy {% set channel_targets = channel_targets or 'conda-forge main' %} From d310343ca763e6d7c086db510102184e5173aa82 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 9 Aug 2026 19:13:40 +1100 Subject: [PATCH 07/10] update or remove obsolete pins in CBC --- recipe/conda_build_config.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/recipe/conda_build_config.yaml b/recipe/conda_build_config.yaml index 9d84028dd..97658c608 100644 --- a/recipe/conda_build_config.yaml +++ b/recipe/conda_build_config.yaml @@ -1,5 +1,3 @@ -MACOSX_SDK_VERSION: # [osx and x86_64] - - 11.0 # [osx and x86_64] # See https://docs.python.org/3.14/whatsnew/3.14.html#a-new-type-of-interpreter c_compiler_version: # [osx] - 20.1 # [osx] @@ -10,7 +8,7 @@ cxx_compiler_version: # [osx] python: - 3.14 numpy: - - 1.16 + - 2 python_impl: - cpython is_python_min: From f5d23c31507eb5975812adbddf59ed4c633bec6b Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Thu, 13 Aug 2026 06:56:50 +1100 Subject: [PATCH 08/10] MNT: Re-rendered with conda-smithy 2026.8.9 and conda-forge-pinning 2026.08.12.13.59.02 Other tools: - conda-build 26.7.0 - rattler-build 0.72.2 - rattler-build-conda-compat 1.4.19 --- .azure-pipelines/azure-pipelines-osx.yml | 55 ++-------- .github/workflows/conda-build.yml | 126 +++------------------- .scripts/create_conda_build_artifacts.bat | 78 -------------- .scripts/create_conda_build_artifacts.sh | 114 -------------------- README.md | 25 ++--- 5 files changed, 38 insertions(+), 360 deletions(-) delete mode 100755 .scripts/create_conda_build_artifacts.bat delete mode 100755 .scripts/create_conda_build_artifacts.sh diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml index 3dcf9383d..00cdd8c15 100644 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ b/.azure-pipelines/azure-pipelines-osx.yml @@ -16,9 +16,8 @@ jobs: free_disk_space: skip pagefile_size: 0 resize_partitions: false - store_build_artifacts: true + store_build_artifacts: false tools_install_dir: ~/miniforge3 - CONFIG_SHORT: osx_64_build_typedebugchannel_targetscon_h5e478946 osx_64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes: CONFIG: osx_64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes UPLOAD_PACKAGES: 'True' @@ -27,9 +26,8 @@ jobs: free_disk_space: skip pagefile_size: 0 resize_partitions: false - store_build_artifacts: true + store_build_artifacts: false tools_install_dir: ~/miniforge3 - CONFIG_SHORT: osx_64_build_typedebugchannel_targetscon_h116d3356 osx_64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno: CONFIG: osx_64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno UPLOAD_PACKAGES: 'True' @@ -38,9 +36,8 @@ jobs: free_disk_space: skip pagefile_size: 0 resize_partitions: false - store_build_artifacts: true + store_build_artifacts: false tools_install_dir: ~/miniforge3 - CONFIG_SHORT: osx_64_build_typereleasechannel_targetsc_h425d4db0 osx_64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes: CONFIG: osx_64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes UPLOAD_PACKAGES: 'True' @@ -49,9 +46,8 @@ jobs: free_disk_space: skip pagefile_size: 0 resize_partitions: false - store_build_artifacts: true + store_build_artifacts: false tools_install_dir: ~/miniforge3 - CONFIG_SHORT: osx_64_build_typereleasechannel_targetsc_haa8f77b8 osx_arm64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno: CONFIG: osx_arm64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno UPLOAD_PACKAGES: 'True' @@ -60,9 +56,8 @@ jobs: free_disk_space: skip pagefile_size: 0 resize_partitions: false - store_build_artifacts: true + store_build_artifacts: false tools_install_dir: ~/miniforge3 - CONFIG_SHORT: osx_arm64_build_typedebugchannel_targets_h4a1f0d05 osx_arm64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes: CONFIG: osx_arm64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes UPLOAD_PACKAGES: 'True' @@ -71,9 +66,8 @@ jobs: free_disk_space: skip pagefile_size: 0 resize_partitions: false - store_build_artifacts: true + store_build_artifacts: false tools_install_dir: ~/miniforge3 - CONFIG_SHORT: osx_arm64_build_typedebugchannel_targets_h49dbe0c1 osx_arm64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno: CONFIG: osx_arm64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno UPLOAD_PACKAGES: 'True' @@ -82,9 +76,8 @@ jobs: free_disk_space: skip pagefile_size: 0 resize_partitions: false - store_build_artifacts: true + store_build_artifacts: false tools_install_dir: ~/miniforge3 - CONFIG_SHORT: osx_arm64_build_typereleasechannel_targe_h0d9a29af osx_arm64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes: CONFIG: osx_arm64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes UPLOAD_PACKAGES: 'True' @@ -93,9 +86,8 @@ jobs: free_disk_space: skip pagefile_size: 0 resize_partitions: false - store_build_artifacts: true + store_build_artifacts: false tools_install_dir: ~/miniforge3 - CONFIG_SHORT: osx_arm64_build_typereleasechannel_targe_h92a1d5a6 timeoutInMinutes: 360 variables: {} @@ -122,34 +114,3 @@ jobs: BINSTAR_TOKEN: $(BINSTAR_TOKEN) FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) - - - script: | - export ARTIFACT_STAGING_DIR="$(Build.ArtifactStagingDirectory)" - # Archive everything in CONDA_BLD_PATH except environments - export BLD_ARTIFACT_PREFIX=conda_artifacts - export CI=azure - export CI_RUN_ID=$(build.BuildNumber).$(system.JobAttempt) - export CONDA_BLD_PATH=$(build_workspace_dir) - export FEEDSTOCK_NAME=$(basename ${BUILD_REPOSITORY_NAME}) - export MINIFORGE_HOME=$(tools_install_dir) - if [[ "$AGENT_JOBSTATUS" == "Failed" ]]; then - # Archive the CONDA_BLD_PATH environments only when the job fails - export ENV_ARTIFACT_PREFIX=conda_envs - fi - ./.scripts/create_conda_build_artifacts.sh - displayName: Prepare conda build artifacts - condition: and(succeededOrFailed(), eq(variables.store_build_artifacts, true)) - - - task: PublishPipelineArtifact@1 - displayName: Store conda build artifacts - condition: not(eq(variables.BLD_ARTIFACT_PATH, '')) - inputs: - targetPath: $(BLD_ARTIFACT_PATH) - artifactName: $(BLD_ARTIFACT_NAME) - - - task: PublishPipelineArtifact@1 - displayName: Store conda build environment artifacts - condition: not(eq(variables.ENV_ARTIFACT_PATH, '')) - inputs: - targetPath: $(ENV_ARTIFACT_PATH) - artifactName: $(ENV_ARTIFACT_NAME) diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index 251790e66..04e27914e 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -23,9 +23,8 @@ jobs: matrix: include: - CONFIG: linux_64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno - CONFIG_SHORT: linux_64_build_typedebugchannel_targetsc_h10d856d4 DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma10 - STORE_BUILD_ARTIFACTS: True + STORE_BUILD_ARTIFACTS: False UPLOAD_PACKAGES: True build_workspace_dir: build_artifacts docker_run_args: @@ -36,9 +35,8 @@ jobs: runs_on: ['ubuntu-latest'] tools_install_dir: ~/miniforge3 - CONFIG: linux_64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes - CONFIG_SHORT: linux_64_build_typedebugchannel_targetsc_hf83d9e2d DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma10 - STORE_BUILD_ARTIFACTS: True + STORE_BUILD_ARTIFACTS: False UPLOAD_PACKAGES: True build_workspace_dir: build_artifacts docker_run_args: @@ -49,9 +47,8 @@ jobs: runs_on: ['ubuntu-latest'] tools_install_dir: ~/miniforge3 - CONFIG: linux_64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno - CONFIG_SHORT: linux_64_build_typereleasechannel_target_h01f3c156 DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma10 - STORE_BUILD_ARTIFACTS: True + STORE_BUILD_ARTIFACTS: False UPLOAD_PACKAGES: True build_workspace_dir: build_artifacts docker_run_args: @@ -62,9 +59,8 @@ jobs: runs_on: ['ubuntu-latest'] tools_install_dir: ~/miniforge3 - CONFIG: linux_64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes - CONFIG_SHORT: linux_64_build_typereleasechannel_target_hf5ff4d16 DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma10 - STORE_BUILD_ARTIFACTS: True + STORE_BUILD_ARTIFACTS: False UPLOAD_PACKAGES: True build_workspace_dir: build_artifacts docker_run_args: @@ -75,9 +71,8 @@ jobs: runs_on: ['ubuntu-latest'] tools_install_dir: ~/miniforge3 - CONFIG: linux_aarch64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno - CONFIG_SHORT: linux_aarch64_build_typedebugchannel_tar_hd2db0a21 DOCKER_IMAGE: quay.io/condaforge/linux-anvil-aarch64:alma10 - STORE_BUILD_ARTIFACTS: True + STORE_BUILD_ARTIFACTS: False UPLOAD_PACKAGES: True build_workspace_dir: build_artifacts docker_run_args: @@ -88,9 +83,8 @@ jobs: runs_on: ['ubuntu-24.04-arm'] tools_install_dir: ~/miniforge3 - CONFIG: linux_aarch64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes - CONFIG_SHORT: linux_aarch64_build_typedebugchannel_tar_h51de9693 DOCKER_IMAGE: quay.io/condaforge/linux-anvil-aarch64:alma10 - STORE_BUILD_ARTIFACTS: True + STORE_BUILD_ARTIFACTS: False UPLOAD_PACKAGES: True build_workspace_dir: build_artifacts docker_run_args: @@ -101,9 +95,8 @@ jobs: runs_on: ['ubuntu-24.04-arm'] tools_install_dir: ~/miniforge3 - CONFIG: linux_aarch64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno - CONFIG_SHORT: linux_aarch64_build_typereleasechannel_t_hccc48f4a DOCKER_IMAGE: quay.io/condaforge/linux-anvil-aarch64:alma10 - STORE_BUILD_ARTIFACTS: True + STORE_BUILD_ARTIFACTS: False UPLOAD_PACKAGES: True build_workspace_dir: build_artifacts docker_run_args: @@ -114,9 +107,8 @@ jobs: runs_on: ['ubuntu-24.04-arm'] tools_install_dir: ~/miniforge3 - CONFIG: linux_aarch64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes - CONFIG_SHORT: linux_aarch64_build_typereleasechannel_t_h78d2c7f5 DOCKER_IMAGE: quay.io/condaforge/linux-anvil-aarch64:alma10 - STORE_BUILD_ARTIFACTS: True + STORE_BUILD_ARTIFACTS: False UPLOAD_PACKAGES: True build_workspace_dir: build_artifacts docker_run_args: @@ -127,9 +119,8 @@ jobs: runs_on: ['ubuntu-24.04-arm'] tools_install_dir: ~/miniforge3 - CONFIG: linux_ppc64le_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno - CONFIG_SHORT: linux_ppc64le_build_typedebugchannel_tar_hac8bb296 DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma10 - STORE_BUILD_ARTIFACTS: True + STORE_BUILD_ARTIFACTS: False UPLOAD_PACKAGES: True build_workspace_dir: build_artifacts docker_run_args: @@ -140,9 +131,8 @@ jobs: runs_on: ['ubuntu-latest'] tools_install_dir: ~/miniforge3 - CONFIG: linux_ppc64le_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes - CONFIG_SHORT: linux_ppc64le_build_typedebugchannel_tar_hb74ed675 DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma10 - STORE_BUILD_ARTIFACTS: True + STORE_BUILD_ARTIFACTS: False UPLOAD_PACKAGES: True build_workspace_dir: build_artifacts docker_run_args: @@ -153,9 +143,8 @@ jobs: runs_on: ['ubuntu-latest'] tools_install_dir: ~/miniforge3 - CONFIG: linux_ppc64le_build_typereleasechannel_targetsconda-forge_mainfreethreadingno - CONFIG_SHORT: linux_ppc64le_build_typereleasechannel_t_h5454d1d5 DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma10 - STORE_BUILD_ARTIFACTS: True + STORE_BUILD_ARTIFACTS: False UPLOAD_PACKAGES: True build_workspace_dir: build_artifacts docker_run_args: @@ -166,9 +155,8 @@ jobs: runs_on: ['ubuntu-latest'] tools_install_dir: ~/miniforge3 - CONFIG: linux_ppc64le_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes - CONFIG_SHORT: linux_ppc64le_build_typereleasechannel_t_hed84b2c3 DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma10 - STORE_BUILD_ARTIFACTS: True + STORE_BUILD_ARTIFACTS: False UPLOAD_PACKAGES: True build_workspace_dir: build_artifacts docker_run_args: @@ -179,8 +167,7 @@ jobs: runs_on: ['ubuntu-latest'] tools_install_dir: ~/miniforge3 - CONFIG: win_64_freethreadingno - CONFIG_SHORT: win_64_freethreadingno - STORE_BUILD_ARTIFACTS: True + STORE_BUILD_ARTIFACTS: False UPLOAD_PACKAGES: True build_platform: win-64 build_workspace_dir: D:\\bld\\ @@ -192,8 +179,7 @@ jobs: runs_on: ['windows-2022'] tools_install_dir: D:\Miniforge - CONFIG: win_64_freethreadingyes - CONFIG_SHORT: win_64_freethreadingyes - STORE_BUILD_ARTIFACTS: True + STORE_BUILD_ARTIFACTS: False UPLOAD_PACKAGES: True build_platform: win-64 build_workspace_dir: D:\\bld\\ @@ -205,8 +191,7 @@ jobs: runs_on: ['windows-2022'] tools_install_dir: D:\Miniforge - CONFIG: win_arm64_freethreadingno - CONFIG_SHORT: win_arm64_freethreadingno - STORE_BUILD_ARTIFACTS: True + STORE_BUILD_ARTIFACTS: False UPLOAD_PACKAGES: True build_platform: win-64 build_workspace_dir: D:\\bld\\ @@ -218,8 +203,7 @@ jobs: runs_on: ['windows-2022'] tools_install_dir: D:\Miniforge - CONFIG: win_arm64_freethreadingyes - CONFIG_SHORT: win_arm64_freethreadingyes - STORE_BUILD_ARTIFACTS: True + STORE_BUILD_ARTIFACTS: False UPLOAD_PACKAGES: True build_platform: win-64 build_workspace_dir: D:\\bld\\ @@ -325,80 +309,4 @@ jobs: RATTLER_BUILD_ENABLE_GITHUB_INTEGRATION: 'true' BINSTAR_TOKEN: ${{ secrets.BINSTAR_TOKEN }} FEEDSTOCK_TOKEN: ${{ secrets.FEEDSTOCK_TOKEN }} - STAGING_BINSTAR_TOKEN: ${{ secrets.STAGING_BINSTAR_TOKEN }} - - - name: Determine build outcome - # this is to merge the status of the linux/osx/win builds into - # something we can easily reuse during artefact generation - id: determine-status - if: ${{ always() }} - shell: bash - env: - OS: ${{ matrix.os }} - run: | - if [[ "$OS" == "ubuntu" ]]; then - STATUS=${{ steps.build-linux.outcome }} - elif [[ "$OS" == "macos" ]]; then - STATUS=${{ steps.build-macos.outcome }} - elif [[ "$OS" == "windows" ]]; then - STATUS=${{ steps.build-windows.outcome }} - fi - if [ -z "$STATUS" ]; then - # steps that never ran will have empty status - STATUS="cancelled" - fi - echo "status=$STATUS" >> $GITHUB_OUTPUT - - - name: Prepare conda build artifacts - continue-on-error: true - id: prepare-artifacts - shell: bash - # we do not want to trigger artefact creation if the build was cancelled - if: ${{ always() && steps.determine-status.outputs.status != 'cancelled' && matrix.STORE_BUILD_ARTIFACTS }} - env: - CI: github_actions - CONDA_BLD_PATH: ${{ matrix.build_workspace_dir }} - CONFIG: ${{ matrix.CONFIG }} - CONFIG_SHORT: ${{ matrix.CONFIG_SHORT }} - JOB_STATUS: ${{ steps.determine-status.outputs.status }} - OS: ${{ matrix.os }} - run: | - export ARTIFACT_STAGING_DIR="$GITHUB_WORKSPACE" - export CI_RUN_ID=$GITHUB_RUN_ID - export CONDA_BLD_PATH="${CONDA_BLD_PATH/#~/${HOME}}" - export FEEDSTOCK_NAME="$(basename $GITHUB_REPOSITORY)" - export MINIFORGE_HOME="${MINIFORGE_HOME/#~/${HOME}}" - # Archive everything in CONDA_BLD_PATH except environments - # Archive the CONDA_BLD_PATH environments only when the job fails - # Use different prefix for successful and failed build artifacts - # so random failures don't prevent rebuilds from creating artifacts. - if [ $JOB_STATUS == "failure" ]; then - export BLD_ARTIFACT_PREFIX="conda_artifacts" - export ENV_ARTIFACT_PREFIX="conda_envs" - else - export BLD_ARTIFACT_PREFIX="conda_pkgs" - fi - if [ $OS == "windows" ]; then - pwsh -Command ". '.scripts/create_conda_build_artifacts.bat'" - else - ./.scripts/create_conda_build_artifacts.sh - fi - - - name: Store conda build artifacts - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - if: ${{ always() && steps.prepare-artifacts.outcome == 'success' }} - with: - name: ${{ steps.prepare-artifacts.outputs.BLD_ARTIFACT_NAME }} - path: ${{ steps.prepare-artifacts.outputs.BLD_ARTIFACT_PATH }} - retention-days: 14 - continue-on-error: true - - - name: Store conda build environment artifacts - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - # only relevant if build failed, see above - if: ${{ always() && steps.determine-status.outputs.status == 'failure' && steps.prepare-artifacts.outcome == 'success' }} - with: - name: ${{ steps.prepare-artifacts.outputs.ENV_ARTIFACT_NAME }} - path: ${{ steps.prepare-artifacts.outputs.ENV_ARTIFACT_PATH }} - retention-days: 14 - continue-on-error: true \ No newline at end of file + STAGING_BINSTAR_TOKEN: ${{ secrets.STAGING_BINSTAR_TOKEN }} \ No newline at end of file diff --git a/.scripts/create_conda_build_artifacts.bat b/.scripts/create_conda_build_artifacts.bat deleted file mode 100755 index 705dc461b..000000000 --- a/.scripts/create_conda_build_artifacts.bat +++ /dev/null @@ -1,78 +0,0 @@ -setlocal enableextensions enabledelayedexpansion - -rem INPUTS (environment variables that need to be set before calling this script): -rem -rem CI (azure/github_actions/UNSET) -rem CI_RUN_ID (unique identifier for the CI job run) -rem CONDA_BLD_PATH (path to the conda-bld directory) -rem CONFIG (build matrix configuration string) -rem CONFIG_SHORT (uniquely-shortened configuration string) -rem FEEDSTOCK_NAME -rem Optional: -rem ARTIFACT_STAGING_DIR (use working directory if unset) -rem BLD_ARTIFACT_PREFIX (prefix for the conda build artifact name, skip if unset) -rem ENV_ARTIFACT_PREFIX (prefix for the conda build environments artifact name, skip if unset) - -rem OUTPUTS -rem -rem BLD_ARTIFACT_NAME -rem BLD_ARTIFACT_PATH -rem ENV_ARTIFACT_NAME -rem ENV_ARTIFACT_PATH - -rem Check that the conda-build directory exists -if not exist %CONDA_BLD_PATH% ( - echo conda-build directory does not exist - exit 1 -) - -if not defined ARTIFACT_STAGING_DIR ( - rem Set staging dir to the working dir - set ARTIFACT_STAGING_DIR=%cd% -) - -rem Set a unique ID for the artifact(s), specialized for this particular job run -set ARTIFACT_UNIQUE_ID=%CI_RUN_ID%_%CONFIG% -if not "%ARTIFACT_UNIQUE_ID%" == "%ARTIFACT_UNIQUE_ID:~0,80%" ( - set ARTIFACT_UNIQUE_ID=%CI_RUN_ID%_%CONFIG_SHORT% -) - -rem Make the build artifact zip -if defined BLD_ARTIFACT_PREFIX ( - set BLD_ARTIFACT_NAME=%BLD_ARTIFACT_PREFIX%_%ARTIFACT_UNIQUE_ID% - echo BLD_ARTIFACT_NAME: !BLD_ARTIFACT_NAME! - - set "BLD_ARTIFACT_PATH=%ARTIFACT_STAGING_DIR%\%FEEDSTOCK_NAME%_%BLD_ARTIFACT_PREFIX%_%ARCHIVE_UNIQUE_ID%.zip" - 7z a "!BLD_ARTIFACT_PATH!" "%CONDA_BLD_PATH%" -xr^^!.git/ -xr^^!_*_env*/ -xr^^!*_cache/ -bb - if errorlevel 1 exit 1 - echo BLD_ARTIFACT_PATH: !BLD_ARTIFACT_PATH! - - if "%CI%" == "azure" ( - echo ##vso[task.setVariable variable=BLD_ARTIFACT_NAME]!BLD_ARTIFACT_NAME! - echo ##vso[task.setVariable variable=BLD_ARTIFACT_PATH]!BLD_ARTIFACT_PATH! - ) - if "%CI%" == "github_actions" ( - echo BLD_ARTIFACT_NAME=!BLD_ARTIFACT_NAME!>> !GITHUB_OUTPUT! - echo BLD_ARTIFACT_PATH=!BLD_ARTIFACT_PATH!>> !GITHUB_OUTPUT! - ) -) - -rem Make the environments artifact zip -if defined ENV_ARTIFACT_PREFIX ( - set ENV_ARTIFACT_NAME=!ENV_ARTIFACT_PREFIX!_%ARTIFACT_UNIQUE_ID% - echo ENV_ARTIFACT_NAME: !ENV_ARTIFACT_NAME! - - set "ENV_ARTIFACT_PATH=%ARTIFACT_STAGING_DIR%\%FEEDSTOCK_NAME%_%ENV_ARTIFACT_PREFIX%_%ARCHIVE_UNIQUE_ID%.zip" - 7z a "!ENV_ARTIFACT_PATH!" -r "%CONDA_BLD_PATH%"/_*_env*/ -bb - if errorlevel 1 exit 1 - echo ENV_ARTIFACT_PATH: !ENV_ARTIFACT_PATH! - - if "%CI%" == "azure" ( - echo ##vso[task.setVariable variable=ENV_ARTIFACT_NAME]!ENV_ARTIFACT_NAME! - echo ##vso[task.setVariable variable=ENV_ARTIFACT_PATH]!ENV_ARTIFACT_PATH! - ) - if "%CI%" == "github_actions" ( - echo ENV_ARTIFACT_NAME=!ENV_ARTIFACT_NAME!>> !GITHUB_OUTPUT! - echo ENV_ARTIFACT_PATH=!ENV_ARTIFACT_PATH!>> !GITHUB_OUTPUT! - ) -) diff --git a/.scripts/create_conda_build_artifacts.sh b/.scripts/create_conda_build_artifacts.sh deleted file mode 100755 index 91095c05d..000000000 --- a/.scripts/create_conda_build_artifacts.sh +++ /dev/null @@ -1,114 +0,0 @@ -#!/usr/bin/env bash - -# INPUTS (environment variables that need to be set before calling this script): -# -# CI (azure/github_actions/UNSET) -# CI_RUN_ID (unique identifier for the CI job run) -# CONDA_BLD_PATH (path to the conda-bld directory) -# CONFIG (build matrix configuration string) -# CONFIG_SHORT (uniquely-shortened configuration string) -# FEEDSTOCK_NAME -# Optional: -# ARTIFACT_STAGING_DIR (use working directory if unset) -# BLD_ARTIFACT_PREFIX (prefix for the conda build artifact name, skip if unset) -# ENV_ARTIFACT_PREFIX (prefix for the conda build environments artifact name, skip if unset) - -# OUTPUTS -# -# BLD_ARTIFACT_NAME -# BLD_ARTIFACT_PATH -# ENV_ARTIFACT_NAME -# ENV_ARTIFACT_PATH - -source .scripts/logging_utils.sh - -# DON'T do set -x, because it results in double echo-ing pipeline commands -# and that might end up inserting extraneous quotation marks in output variables -set -e - -# Check that the conda-build directory exists -if [ ! -d "$CONDA_BLD_PATH" ]; then - echo "conda-build directory does not exist" - exit 1 -fi - -# Set staging dir to the working dir, in Windows style if applicable -if [[ -z "${ARTIFACT_STAGING_DIR}" ]]; then - if pwd -W; then - ARTIFACT_STAGING_DIR=$(pwd -W) - else - ARTIFACT_STAGING_DIR=$PWD - fi -fi -echo "ARTIFACT_STAGING_DIR: $ARTIFACT_STAGING_DIR" - -FEEDSTOCK_ROOT=$(cd "$(dirname "$0")/.."; pwd;) -if [ -z ${FEEDSTOCK_NAME} ]; then - export FEEDSTOCK_NAME=$(basename ${FEEDSTOCK_ROOT}) -fi - -# Set a unique ID for the artifact(s), specialized for this particular job run -ARTIFACT_UNIQUE_ID="${CI_RUN_ID}_${CONFIG}" -if [[ ${#ARTIFACT_UNIQUE_ID} -gt 80 ]]; then - ARTIFACT_UNIQUE_ID="${CI_RUN_ID}_${CONFIG_SHORT}" -fi -echo "ARTIFACT_UNIQUE_ID: $ARTIFACT_UNIQUE_ID" - -# Set a descriptive ID for the archive(s), specialized for this particular job run -ARCHIVE_UNIQUE_ID="${CI_RUN_ID}_${CONFIG}" - -# Make the build artifact zip -if [[ ! -z "$BLD_ARTIFACT_PREFIX" ]]; then - export BLD_ARTIFACT_NAME="${BLD_ARTIFACT_PREFIX}_${ARTIFACT_UNIQUE_ID}" - export BLD_ARTIFACT_PATH="${ARTIFACT_STAGING_DIR}/${FEEDSTOCK_NAME}_${BLD_ARTIFACT_PREFIX}_${ARCHIVE_UNIQUE_ID}.zip" - - ( startgroup "Archive conda build directory" ) 2> /dev/null - - # Try 7z and fall back to zip if it fails (for cross-platform use) - if ! 7z a "$BLD_ARTIFACT_PATH" "$CONDA_BLD_PATH" '-xr!.git/' '-xr!_*_env*/' '-xr!*_cache/' -bb; then - pushd "$CONDA_BLD_PATH" - zip -r -y -T "$BLD_ARTIFACT_PATH" . -x '*.git/*' '*_*_env*/*' '*_cache/*' - popd - fi - - ( endgroup "Archive conda build directory" ) 2> /dev/null - - echo "BLD_ARTIFACT_NAME: $BLD_ARTIFACT_NAME" - echo "BLD_ARTIFACT_PATH: $BLD_ARTIFACT_PATH" - - if [[ "$CI" == "azure" ]]; then - echo "##vso[task.setVariable variable=BLD_ARTIFACT_NAME]$BLD_ARTIFACT_NAME" - echo "##vso[task.setVariable variable=BLD_ARTIFACT_PATH]$BLD_ARTIFACT_PATH" - elif [[ "$CI" == "github_actions" ]]; then - echo "BLD_ARTIFACT_NAME=$BLD_ARTIFACT_NAME" >> $GITHUB_OUTPUT - echo "BLD_ARTIFACT_PATH=$BLD_ARTIFACT_PATH" >> $GITHUB_OUTPUT - fi -fi - -# Make the environments artifact zip -if [[ ! -z "$ENV_ARTIFACT_PREFIX" ]]; then - export ENV_ARTIFACT_NAME="${ENV_ARTIFACT_PREFIX}_${ARTIFACT_UNIQUE_ID}" - export ENV_ARTIFACT_PATH="${ARTIFACT_STAGING_DIR}/${FEEDSTOCK_NAME}_${ENV_ARTIFACT_PREFIX}_${ARCHIVE_UNIQUE_ID}.zip" - - ( startgroup "Archive conda build environments" ) 2> /dev/null - - # Try 7z and fall back to zip if it fails (for cross-platform use) - if ! 7z a "$ENV_ARTIFACT_PATH" -r "$CONDA_BLD_PATH"/'_*_env*/' -bb; then - pushd "$CONDA_BLD_PATH" - zip -r -y -T "$ENV_ARTIFACT_PATH" . -i '*_*_env*/*' - popd - fi - - ( endgroup "Archive conda build environments" ) 2> /dev/null - - echo "ENV_ARTIFACT_NAME: $ENV_ARTIFACT_NAME" - echo "ENV_ARTIFACT_PATH: $ENV_ARTIFACT_PATH" - - if [[ "$CI" == "azure" ]]; then - echo "##vso[task.setVariable variable=ENV_ARTIFACT_NAME]$ENV_ARTIFACT_NAME" - echo "##vso[task.setVariable variable=ENV_ARTIFACT_PATH]$ENV_ARTIFACT_PATH" - elif [[ "$CI" == "github_actions" ]]; then - echo "ENV_ARTIFACT_NAME=$ENV_ARTIFACT_NAME" >> $GITHUB_OUTPUT - echo "ENV_ARTIFACT_PATH=$ENV_ARTIFACT_PATH" >> $GITHUB_OUTPUT - fi -fi diff --git a/README.md b/README.md index 5566e09c5..1756faa73 100644 --- a/README.md +++ b/README.md @@ -135,6 +135,7 @@ Current release info | Name | Downloads | Version | Platforms | | --- | --- | --- | --- | | [![Conda Recipe](https://img.shields.io/badge/recipe-cpython-green.svg)](https://anaconda.org/conda-forge/cpython) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/cpython.svg)](https://anaconda.org/conda-forge/cpython) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/cpython.svg)](https://anaconda.org/conda-forge/cpython) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/cpython.svg)](https://anaconda.org/conda-forge/cpython) | +| [![Conda Recipe](https://img.shields.io/badge/recipe-libpython-green.svg)](https://anaconda.org/conda-forge/libpython) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/libpython.svg)](https://anaconda.org/conda-forge/libpython) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/libpython.svg)](https://anaconda.org/conda-forge/libpython) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/libpython.svg)](https://anaconda.org/conda-forge/libpython) | | [![Conda Recipe](https://img.shields.io/badge/recipe-libpython--static-green.svg)](https://anaconda.org/conda-forge/libpython-static) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/libpython-static.svg)](https://anaconda.org/conda-forge/libpython-static) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/libpython-static.svg)](https://anaconda.org/conda-forge/libpython-static) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/libpython-static.svg)](https://anaconda.org/conda-forge/libpython-static) | | [![Conda Recipe](https://img.shields.io/badge/recipe-python-green.svg)](https://anaconda.org/conda-forge/python) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/python.svg)](https://anaconda.org/conda-forge/python) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/python.svg)](https://anaconda.org/conda-forge/python) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/python.svg)](https://anaconda.org/conda-forge/python) | | [![Conda Recipe](https://img.shields.io/badge/recipe-python--freethreading-green.svg)](https://anaconda.org/conda-forge/python-freethreading) | [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/python-freethreading.svg)](https://anaconda.org/conda-forge/python-freethreading) | [![Conda Version](https://img.shields.io/conda/vn/conda-forge/python-freethreading.svg)](https://anaconda.org/conda-forge/python-freethreading) | [![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/python-freethreading.svg)](https://anaconda.org/conda-forge/python-freethreading) | @@ -144,10 +145,10 @@ Current release info Installing python ================= -Installing `python` from the `conda-forge` channel can be achieved by adding `conda-forge` to your channels with: +Installing `python` from the `conda-forge/label/python_debug` channel can be achieved by adding `conda-forge/label/python_debug` to your channels with: ``` -conda config --add channels conda-forge +conda config --add channels conda-forge/label/python_debug conda config --set channel_priority strict ``` @@ -158,7 +159,7 @@ How to use With conda ``` -conda install cpython libpython-static python python-freethreading python-gil python-jit +conda install cpython libpython libpython-static python python-freethreading python-gil python-jit ``` @@ -167,7 +168,7 @@ conda install cpython libpython-static python python-freethreading python-gil py With mamba ``` -mamba install cpython libpython-static python python-freethreading python-gil python-jit +mamba install cpython libpython libpython-static python python-freethreading python-gil python-jit ``` @@ -177,9 +178,9 @@ mamba install cpython libpython-static python python-freethreading python-gil py ``` # for adding to your local project -pixi add cpython libpython-static python python-freethreading python-gil python-jit +pixi add cpython libpython libpython-static python python-freethreading python-gil python-jit # for installing globally -pixi global install cpython libpython-static python python-freethreading python-gil python-jit +pixi global install cpython libpython libpython-static python python-freethreading python-gil python-jit ``` @@ -193,7 +194,7 @@ It is possible to list all of the versions of `cpython` available on your platfo With conda ``` -conda search cpython --channel conda-forge +conda search cpython --channel conda-forge/label/python_debug ``` @@ -202,7 +203,7 @@ conda search cpython --channel conda-forge With mamba ``` -mamba search cpython --channel conda-forge +mamba search cpython --channel conda-forge/label/python_debug ``` @@ -211,7 +212,7 @@ mamba search cpython --channel conda-forge With pixi ``` -pixi search cpython --channel conda-forge +pixi search cpython --channel conda-forge/label/python_debug ``` @@ -221,13 +222,13 @@ pixi search cpython --channel conda-forge ``` # Search all versions available on your platform: -mamba repoquery search cpython --channel conda-forge +mamba repoquery search cpython --channel conda-forge/label/python_debug # List packages depending on `cpython`: -mamba repoquery whoneeds cpython --channel conda-forge +mamba repoquery whoneeds cpython --channel conda-forge/label/python_debug # List dependencies of `cpython`: -mamba repoquery depends cpython --channel conda-forge +mamba repoquery depends cpython --channel conda-forge/label/python_debug ``` From ea48d23e8cb1a3055e855797c44411409d80fd37 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Thu, 13 Aug 2026 07:04:20 +1100 Subject: [PATCH 09/10] add support for riscv --- conda-forge.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/conda-forge.yml b/conda-forge.yml index 3b7509423..a0424d7ab 100644 --- a/conda-forge.yml +++ b/conda-forge.yml @@ -6,6 +6,7 @@ bot: - '3.13' build_platform: linux_ppc64le: linux_64 + linux_riscv64: linux_64 win_arm64: win_64 conda_build: pkg_format: '2' From e22ead3e72326032de525835b8556c6c430e6310 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Thu, 13 Aug 2026 07:05:48 +1100 Subject: [PATCH 10/10] MNT: Re-rendered with conda-smithy 2026.8.9 and conda-forge-pinning 2026.08.12.13.59.02 Other tools: - conda-build 26.7.0 - rattler-build 0.72.2 - rattler-build-conda-compat 1.4.19 --- ...nda-forge_python_debugfreethreadingno.yaml | 59 +++++++++++++++++++ ...da-forge_python_debugfreethreadingyes.yaml | 59 +++++++++++++++++++ ...argetsconda-forge_mainfreethreadingno.yaml | 59 +++++++++++++++++++ ...rgetsconda-forge_mainfreethreadingyes.yaml | 59 +++++++++++++++++++ .github/workflows/conda-build.yml | 48 +++++++++++++++ 5 files changed, 284 insertions(+) create mode 100644 .ci_support/linux_riscv64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno.yaml create mode 100644 .ci_support/linux_riscv64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes.yaml create mode 100644 .ci_support/linux_riscv64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno.yaml create mode 100644 .ci_support/linux_riscv64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes.yaml diff --git a/.ci_support/linux_riscv64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno.yaml b/.ci_support/linux_riscv64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno.yaml new file mode 100644 index 000000000..ef1e4d9c5 --- /dev/null +++ b/.ci_support/linux_riscv64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno.yaml @@ -0,0 +1,59 @@ +build_type: +- debug +bzip2: +- '1' +c_compiler: +- gcc +c_compiler_version: +- '15' +c_stdlib: +- sysroot +c_stdlib_version: +- '2.39' +channel_sources: +- conda-forge/label/python_rc,conda-forge +channel_targets: +- conda-forge python_debug +cxx_compiler: +- gxx +cxx_compiler_version: +- '15' +docker_image: +- quay.io/condaforge/linux-anvil-x86_64:alma10 +expat: +- '2' +freethreading: +- 'no' +libffi: +- '3.7' +liblzma_devel: +- '5' +libsqlite: +- '3' +libuuid: +- '2' +ncurses: +- '6' +openssl: +- '3.5' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- '3.14' +readline: +- '8' +target_platform: +- linux-riscv64 +tk: +- '8.6' +zip_keys: +- - build_type + - channel_targets +- - c_compiler_version + - cxx_compiler_version +zlib: +- '1' +zstd: +- '1.5' diff --git a/.ci_support/linux_riscv64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes.yaml b/.ci_support/linux_riscv64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes.yaml new file mode 100644 index 000000000..383b2ba41 --- /dev/null +++ b/.ci_support/linux_riscv64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes.yaml @@ -0,0 +1,59 @@ +build_type: +- debug +bzip2: +- '1' +c_compiler: +- gcc +c_compiler_version: +- '15' +c_stdlib: +- sysroot +c_stdlib_version: +- '2.39' +channel_sources: +- conda-forge/label/python_rc,conda-forge +channel_targets: +- conda-forge python_debug +cxx_compiler: +- gxx +cxx_compiler_version: +- '15' +docker_image: +- quay.io/condaforge/linux-anvil-x86_64:alma10 +expat: +- '2' +freethreading: +- 'yes' +libffi: +- '3.7' +liblzma_devel: +- '5' +libsqlite: +- '3' +libuuid: +- '2' +ncurses: +- '6' +openssl: +- '3.5' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- '3.14' +readline: +- '8' +target_platform: +- linux-riscv64 +tk: +- '8.6' +zip_keys: +- - build_type + - channel_targets +- - c_compiler_version + - cxx_compiler_version +zlib: +- '1' +zstd: +- '1.5' diff --git a/.ci_support/linux_riscv64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno.yaml b/.ci_support/linux_riscv64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno.yaml new file mode 100644 index 000000000..61a7f814a --- /dev/null +++ b/.ci_support/linux_riscv64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno.yaml @@ -0,0 +1,59 @@ +build_type: +- release +bzip2: +- '1' +c_compiler: +- gcc +c_compiler_version: +- '15' +c_stdlib: +- sysroot +c_stdlib_version: +- '2.39' +channel_sources: +- conda-forge/label/python_rc,conda-forge +channel_targets: +- conda-forge main +cxx_compiler: +- gxx +cxx_compiler_version: +- '15' +docker_image: +- quay.io/condaforge/linux-anvil-x86_64:alma10 +expat: +- '2' +freethreading: +- 'no' +libffi: +- '3.7' +liblzma_devel: +- '5' +libsqlite: +- '3' +libuuid: +- '2' +ncurses: +- '6' +openssl: +- '3.5' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- '3.14' +readline: +- '8' +target_platform: +- linux-riscv64 +tk: +- '8.6' +zip_keys: +- - build_type + - channel_targets +- - c_compiler_version + - cxx_compiler_version +zlib: +- '1' +zstd: +- '1.5' diff --git a/.ci_support/linux_riscv64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes.yaml b/.ci_support/linux_riscv64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes.yaml new file mode 100644 index 000000000..0ae5df74d --- /dev/null +++ b/.ci_support/linux_riscv64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes.yaml @@ -0,0 +1,59 @@ +build_type: +- release +bzip2: +- '1' +c_compiler: +- gcc +c_compiler_version: +- '15' +c_stdlib: +- sysroot +c_stdlib_version: +- '2.39' +channel_sources: +- conda-forge/label/python_rc,conda-forge +channel_targets: +- conda-forge main +cxx_compiler: +- gxx +cxx_compiler_version: +- '15' +docker_image: +- quay.io/condaforge/linux-anvil-x86_64:alma10 +expat: +- '2' +freethreading: +- 'yes' +libffi: +- '3.7' +liblzma_devel: +- '5' +libsqlite: +- '3' +libuuid: +- '2' +ncurses: +- '6' +openssl: +- '3.5' +pin_run_as_build: + python: + min_pin: x.x + max_pin: x.x +python: +- '3.14' +readline: +- '8' +target_platform: +- linux-riscv64 +tk: +- '8.6' +zip_keys: +- - build_type + - channel_targets +- - c_compiler_version + - cxx_compiler_version +zlib: +- '1' +zstd: +- '1.5' diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index 04e27914e..da447dcc0 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -166,6 +166,54 @@ jobs: resize_partitions: False runs_on: ['ubuntu-latest'] tools_install_dir: ~/miniforge3 + - CONFIG: linux_riscv64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingno + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma10 + STORE_BUILD_ARTIFACTS: False + UPLOAD_PACKAGES: True + build_workspace_dir: build_artifacts + docker_run_args: + free_disk_space: skip + os: ubuntu + pagefile_size: 0 + resize_partitions: False + runs_on: ['ubuntu-latest'] + tools_install_dir: ~/miniforge3 + - CONFIG: linux_riscv64_build_typedebugchannel_targetsconda-forge_python_debugfreethreadingyes + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma10 + STORE_BUILD_ARTIFACTS: False + UPLOAD_PACKAGES: True + build_workspace_dir: build_artifacts + docker_run_args: + free_disk_space: skip + os: ubuntu + pagefile_size: 0 + resize_partitions: False + runs_on: ['ubuntu-latest'] + tools_install_dir: ~/miniforge3 + - CONFIG: linux_riscv64_build_typereleasechannel_targetsconda-forge_mainfreethreadingno + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma10 + STORE_BUILD_ARTIFACTS: False + UPLOAD_PACKAGES: True + build_workspace_dir: build_artifacts + docker_run_args: + free_disk_space: skip + os: ubuntu + pagefile_size: 0 + resize_partitions: False + runs_on: ['ubuntu-latest'] + tools_install_dir: ~/miniforge3 + - CONFIG: linux_riscv64_build_typereleasechannel_targetsconda-forge_mainfreethreadingyes + DOCKER_IMAGE: quay.io/condaforge/linux-anvil-x86_64:alma10 + STORE_BUILD_ARTIFACTS: False + UPLOAD_PACKAGES: True + build_workspace_dir: build_artifacts + docker_run_args: + free_disk_space: skip + os: ubuntu + pagefile_size: 0 + resize_partitions: False + runs_on: ['ubuntu-latest'] + tools_install_dir: ~/miniforge3 - CONFIG: win_64_freethreadingno STORE_BUILD_ARTIFACTS: False UPLOAD_PACKAGES: True