Skip to content

feat: Add an option --pass-all-variants-as-env - #2769

Open
isuruf wants to merge 2 commits into
prefix-dev:mainfrom
isuruf:variants-as-env
Open

feat: Add an option --pass-all-variants-as-env#2769
isuruf wants to merge 2 commits into
prefix-dev:mainfrom
isuruf:variants-as-env

Conversation

@isuruf

@isuruf isuruf commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

usually only used variables are sent to build scripts as env variables. this options sends all single element variables to build scripts. this is useful for conda-forge for variables like CROSSCOMPILING_EMULATOR

usually only used variables are sent to build scripts as env
variables. this options sends all single element variables to
build scripts. this is useful for conda-forge for variables like
CROSSCOMPILING_EMULATOR
@isuruf isuruf changed the title Add an option --pass-all-variants-as-env feat: Add an option --pass-all-variants-as-env Aug 25, 2026
@isuruf

isuruf commented Aug 30, 2026

Copy link
Copy Markdown
Contributor Author

@wolfv thoughts on this? If you agree, I can fix the CI and add some tests

@wolfv

wolfv commented Aug 30, 2026

Copy link
Copy Markdown
Member

Hmm I don't think I can agree with this change as it makes it harder to recreate Conda-forge recipes.

What would you say if we add a top level "build env" key that will be used in all outputs?

Or actually, for a slightly hacky solution, if you use the variant keys in the global context then they should be available in all build environments. Or you can possibly use them with the global build.variants.use_keys: [foo, bar] and that will (probably) applied to all outputs (if not we should fix it!)

@isuruf

isuruf commented Aug 30, 2026

Copy link
Copy Markdown
Contributor Author

No, requiring changes to hundreds of recipes to add CROSSCOMPILING_EMULATOR is too much work and error prone. Also, some variables like QEMU_LD_PREFIX are used by compiler activation variables and the recipe author doesn't even know about them. See https://github.com/conda-forge/ctng-compiler-activation-feedstock/blob/main/recipe/activate-gcc.sh#L201 and conda-forge/ctng-compiler-activation-feedstock#146

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants