-
-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add initial integration of rattler-build #1876
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are introducing a bunch of extra template files? I would assume we can use the ones we have already.
Good question! they will be deleted on final PR version - I'm using them in development process to clearly point what is needed new for rattler-build and will integrate it in the old templates |
It would be nice if this were coordinated together with the existing |
We should ping @0xbe7a :) |
Hey @xhochy ! |
The latest conda-smithy version that bela was working on is here: 0xbe7a@1e818fc |
05a96c0
to
0d8161e
Compare
hey @isuruf ! Let me know if there is anything else you want me to refactor |
conda_smithy/lint_recipe.py
Outdated
lint_empty_line_of_the_file(recipe_dir, recipe_fname, lints) | ||
|
||
# 12a: License family must be valid (conda-build checks for that) | ||
rattler_linter.lint_has_recipe_file(about_section, lints) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rattler_linter.lint_has_recipe_file(about_section, lints) | |
rattler_linter.lint_has_license_file(about_section, lints) |
conda_smithy/lint_recipe.py
Outdated
# 15: Check if we are using legacy patterns | ||
rattler_linter.lint_legacy_patterns(requirements_section) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this different from conda-build?
conda_smithy/lint_recipe.py
Outdated
build_reqs = requirements_section.get("build", None) | ||
lints.append(rattler_linter.lint_legacy_compilers(build_reqs)) | ||
|
||
# 22: Single space in pinned requirements |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
As discussed with @isuruf, I've removed the linter from this PR. It will be added in the next one with proper refactoring. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Tests still fail though
fixed. rattler-build was cached in the CI on older version |
Looks good. Can you add a news entry? |
Added |
A piece was missing. Added in #1977. |
High overview of this integration:
conda_build_tool
from conda-forge now supportrattler-build
tool. If recipe.yaml is present when runningconda-smithy init
it will populate the newconda-forge.yaml
with { 'conda_build_tool': 'rattler-build' }MetaData
is created inrattler_build.build
which inherit fromconda_build.Metadata
and overwrite some necessary methods for itself (get_used_var
,get_used_vars
). The rational for this is to keep API the same as much as possible.get_package_variants
function is copied from conda_build with a few changes for rattler-build ( it's main usage is to support generation of different configs files )rattler_build.loader
module contains a class that is used as a custom yaml loader which will evaluate rattler-build variants.yaml selectors.rattler_build.utils
containsfind_recipe
function conda_build with similar API flow, the only necessary change is that VALID_METAS contain recipe.yamlbuild_steps.sh.tmp, run_osx_build.sh.tmpl, run_win_build.bat.tmpl
contains addition of rattler-build command which is added in template using jinja if {%- if conda_build_tool != "rattler-build" %}.tests/recipes
folders. ( example:recipes/py_recipe
)data/rattler-recipe-schema.json
)polarify-feedstock: feat: pre-render with new conda smithy with rattler build support polarify-feedstock#17
Checklist
news
entry