Insert Jinja variables when evaluating script for cache (and tests?)
Small oversight in #894 where we don't inject the proper Jinja context when rendering these sections.
This is slightly tricky, because we are not guaranteed that the rendered recipe is available when testing (users can say that they do not want to include the recipe).
We might have to copy the (evaluated) context inside of the test JSON so we can use it for evaluation, or we try to do some half-evaluation because we would like to render at run time with regards to the host_platform that we are running on, potentially.
We also want to inject the PREFIX, PYTHON and other variables that are dependent on the runtime evaluation of the script.
Later on we would also like to defer the evaluation of the dependencies (as planned, but not yet done). For that we also definitely need selection on target_platform and the like.
@wolfv, We are running into issues with context variables not being substituted in the build scripts. Since this was affecting our existing recipes, we had to pin 0.21.0 version of rattler-build. Is this issue tracking the same bug, or is it something else?