Repository navigation
Read the CI Python versions from the recipes' conda_build_config.yaml - #264
Open
antonwolfy wants to merge 1 commit into
Open
antonwolfy wants to merge 1 commit into
antonwolfy wants to merge 1 commit into
Conversation
antonwolfy
requested review from
jharlow-intel,
ndgrigorian,
vlad-perevezentsev and
xaleryb
as code owners
October 28, 2026 13:29
List the Python versions as full specs in the python: key of conda-recipe/conda_build_config.yaml and conda-recipe-cf/conda_build_config.yaml, the way conda-forge pinning lists them, instead of in the matrix of conda-build-test.yml and the python-versions input. A new variants job in conda-build-test.yml outputs the build/test matrix from that list with a new composite action, .github/actions/conda-python-matrix. Its script reads the list without rendering the recipe, using only the standard library, and rejects bare versions and selectors, so every job gets an explicit ABI, as the 3.14 and 3.15 rows had before. The build job passes each entry to conda build --python, which selects that single variant from the list. The action refers to nothing outside its directory, so it can move to a shared repository together with conda-build-test.yml. The build and test jobs get explicit names, so the check names stay those of the former static matrix: "Build (3.12)" for a version with one build, "Build (3.14, 3.14.* *_cp314t, 3.14t)" for a version with GIL and free-threaded builds. The master ruleset requires the 3.14 Test checks by these names. Update the AGENTS.md files: the Python versions now come from the recipes, a plain "conda build <recipe>" builds all of them, and the action's uses: line must switch to the $/ self-repository syntax when it moves, which actionlint does not support yet.
antonwolfy
force-pushed
the
python-versions-from-recipe
branch
from
October 28, 2026 13:56
005b567 to
4f6d0db
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Python versions that the conda workflows build and test now come from the
python:list in each recipe'sconda_build_config.yaml, in the spec format conda-forge pinning uses:This replaces the static matrix in
conda-build-test.yml, the hard-coded 3.14/3.15 rows, and thepython-versionsinput added in #263.conda-recipe/lists 3.10-3.15 with 3.14t and 3.15t;conda-recipe-cf/lists the feedstock's versions (3.11-3.15, 3.14t) plus 3.15t. To change the set, you now edit the recipe.How it works
variantsjob runs a new composite action,.github/actions/conda-python-matrix, which reads thepython:list from the caller's recipe and outputs the matrix for the build and test jobs. Its script,conda_python_matrix.py, uses only the standard library and doesn't install conda or render the recipe. It fails on bare versions (3.12) and on selectors, so every job gets an explicit ABI; that matters because a bare--python 3.14has been observed to pick the free-threaded build. Quoted entries are accepted. You can run it locally:python .github/actions/conda-python-matrix/conda_python_matrix.py conda-recipe-cf/conda_build_config.yaml.conda build --python "<spec>". With the full list in the config, conda-build then builds only that one variant: renderingconda-recipe-cfgives 7 variants without--pythonand exactly one (python 3.14.10 *_cp314t) with--python "3.14.* *_cp314t".Build (3.12)for a version with one build andBuild (3.14, 3.14.* *_cp314t, 3.14t)for a version with GIL and free-threaded builds. The master ruleset requires the six 3.14Testchecks by these exact names. I compared the generated names with the 46 conda checks reported on Build the conda-forge workflow like the conda-forge feedstock #263, and they are identical. One cosmetic difference: when a failed build skips the whole Test job, GitHub never expands its matrix, so that check shows asTest (${{ matrix.label }})instead ofTest.python_tag, which is now always set (3.12,3.14,3.14t, ...).The exact specs keep the Intel workflow's Python builds the same: Intel-channel Python packages also have
_cpythonbuild strings, so3.12.* *_cpythonstill resolves to the Intel channel'spython 3.12.8(he267403_8_cpythonon linux-64,h3c23a9a_8_cpythonon win-64), as the bare3.12did. 3.13 and 3.15 come from conda-forge (*_cp313,*_cp315t), as before.Side effect: a plain
conda build conda-recipe(orconda-recipe-cf) now builds every listed Python version. Pass--python "3.12.* *_cpython"to build one;conda-recipe/AGENTS.mdsays so.Prepared for the shared workflow
The action's directory refers to nothing outside itself, so it can move to a shared repository together with
conda-build-test.yml. After that move, theuses:line in thevariantsjob must change from./.github/actions/conda-python-matrix(which resolves against the caller's checkout) to$/.github/actions/conda-python-matrix. GitHub's self-repository syntax resolves against the repository of the workflow file itself and needs no checkout. It isn't$/already because actionlint 1.7.12, used by pre-commit, rejects that syntax (rhysd/actionlint#711)..github/AGENTS.mdrecords this.Changes
conda-recipe/conda_build_config.yaml,conda-recipe-cf/conda_build_config.yaml: add thepython:lists.github/actions/conda-python-matrix/: new composite action (action.yml,conda_python_matrix.py)conda-build-test.yml: newvariantsjob; build and test use its matrix and explicit names; thepython-versionsinput and the static matrices are removedconda-package-cf.yml: stop passingpython-versionsAGENTS.mdfiles: the policy "keep the Python matrix in workflow files" becomes "the conda workflows read it from the recipe" (build_pip.ymland the clang workflows keep their own matrices); document the spec rules, the check-name constraint, and the actionTest plan
pre-commit(including black, flake8, isort, pylint and actionlint) andzizmor --min-severity medium .github/report no findingspython:key, and accepts quoted entriesconda renderwith the in-recipe list selects a single variant per--pythonspec, forconda-recipe-cf(conda-forge) andconda-recipe(Intel channel; linux-64 and win-64 for 3.12, 3.13 and 3.15t)conda-forgeWindows test jobs are expected to keep failing until conda-forge ships a pytest with itscoloramadependency restored, as on Build the conda-forge workflow like the conda-forge feedstock #263