ENH: correctly rerender CI configs with new stdlib jinja-function (original) (raw)

This is in the context of regro/cf-scripts#2135 (see links therein).

I tried rendering a recipe with - {{ stdlib("c") }}, and unsurprisingly it failed. Adding the following patch

--- a/conda_smithy/utils.py +++ b/conda_smithy/utils.py @@ -93,6 +93,7 @@ def render_meta_yaml(text): env.globals.update( dict( compiler=lambda x: x + "_compiler_stub",

eliminates the failure (edit: this turned into #1846), but while trying to write tests for this, I got stuck with understanding where in smithy the actual content of the CBC gets generated, and more importantly, where the values are taken from.

For example, I cannot find how gcc gets inserted as the c_compiler - it's neither specified in the code, nor injected by the fixture or the test, nor does it read the global pinning AFAICT.

I tried to follow what's happening in
https://github.com/conda-forge/conda-smithy/blob/main/conda_smithy/configure_feedstock.py and others, and have followed several (apparently) false leads already, so I thought I'd ask if someone can tell me where to look.

To be clear, what I want to ensure is that a line like - {{ stdlib("c") }} ends up inserting the correct c_stdlib{,_version}: ... into the generated ci-config files (pretty much exactly like we do for the compilers), c.f. also conda-forge/conda-forge-pinning-feedstock#5499.

CC @beckermr