boa icon indicating copy to clipboard operation
boa copied to clipboard

Use "additional vars" in variant computation

Open wolfv opened this issue 3 years ago • 1 comments

There are recipes that use additional vars that are not otherwise part of the variant computation inside of Jinja expressions.

For example https://github.com/conda-forge/mpi4jax-feedstock/blob/8ea663e53bdbcf5c0d3f92a381e3daf8c54721f4/recipe/meta.yaml uses {{ mpi }} which expands to two different variants of this package.

wolfv avatar Mar 09 '22 08:03 wolfv

I ran into this while trying to convert a recipe to boa that builds with either mpi and openmpi. Either has a version pinned in conda_build_config.yaml. Using it in the build/host/run section results in a python error on boa render.

I am trying to use the experimental 'features' : i have a feature 'openmpi', another 'mpich', and hopefully they will resolve as in conda-forge, i.e. a build dependency on the versioned package as pinned in 'conda_build_config.yaml', and host dependency on the unversioned package.

It is however a bit of a logical mismatch, since the "feature" is 'mpi', and it has two options, 'openmpi' or 'mpich'. This makes it so wherever ( in the run section for 'mpi4py', in the test function for related test dependencies) I need to check for the presence of either of the features.

Additionally, this package can optionally build a python library; this would be another feature. However, if it was both compiled with mpi and python, I would like to specify as additional run dependency mpi4py; this is not possible with the current feature system.

LunarLanding avatar May 03 '22 19:05 LunarLanding