prefix-dev / rattler-build-conda-compat

rattler-build module which offer compatibility with conda-smithy
BSD 3-Clause "New" or "Revised" License
4 stars 5 forks source link

fix: omit also jinja functions #37

Closed nichmor closed 3 months ago

nichmor commented 3 months ago

We are missing the use-case when jinja function is used in template - it will raise an Exception. This PR aims to fix it.

wolfv commented 3 months ago

Hmm, I think in conda-smithy and friends they have some "shim" functions for this. Do you think we should implement the necessary jinja logic?

nichmor commented 3 months ago

Hmm, I think in conda-smithy and friends they have some "shim" functions for this. Do you think we should implement the necessary jinja logic?

what do you mean by shims?

baszalmstra commented 3 months ago

This is a list of all jinja functionality supported in the recipe: https://github.com/conda/ceps/pull/71 (@wolfv we should merge this)

Do all of these work as expected now?

nichmor commented 3 months ago

Updated the missing filters and added env object. Also added mamba recipe to test that we really don't fail

nichmor commented 3 months ago

@baszalmstra @wolfv I'm setting similar shims as: https://github.com/wolfv/conda-smithy/blob/77cd535868932b088b3db7051cd1640655511343/conda_smithy/utils.py#L110

basically this means that we will render unix part and skip windows

- ${{ "build_mamba.sh" if unix }}
 - ${{ "build_mamba.bat" if win }}

I couldn't find an easier way to preserve them ( chatgpt said that I need to write my own node parser, not sure if we need it right now )

Let me know if it's ok

nichmor commented 3 months ago

@wolfv made the stubs behave the same