Skip to content

Conversation

@mgorny
Copy link
Contributor

@mgorny mgorny commented Jan 22, 2026

Description

This is continuation of #581. It's not ready yet but I'm opening the PR for early feedback. I've started with the commits from #581, then added logic to set python_min Jinja var and fix whitespace in {{ ... }} deps. It feels hacky but I think that's the easiest way of achieving it.

I still need to fix v1 recipes.

Fixes #574.

marcelotrevisani and others added 5 commits January 20, 2026 20:20
…ed a new function to enforce minimum Python version dependencies.

Signed-off-by: Marcelo Trevisani <[email protected]>
Part-of: conda#581
Co-authored-by: Filipe <[email protected]>
Part-of: conda#581
Closes: conda#581
@mgorny
Copy link
Contributor Author

mgorny commented Jan 23, 2026

Right now, the main problem is that {{ python_min }} gets inlined into 3.9.* in v1 recipes (rather than ${{ python_min }}.*). I'm trying to find the code doing that.

@mgorny
Copy link
Contributor Author

mgorny commented Jan 23, 2026

Right now, the main problem is that {{ python_min }} gets inlined into 3.9.* in v1 recipes (rather than ${{ python_min }}.*). I'm trying to find the code doing that.

Oh, it's conda-recipe-manager. Le sigh, I guess we need to address that entirely separately then.

Signed-off-by: Michał Górny <[email protected]>
@mgorny mgorny marked this pull request as ready for review January 23, 2026 19:09
@mgorny mgorny requested a review from a team as a code owner January 23, 2026 19:09
@mgorny
Copy link
Contributor Author

mgorny commented Jan 23, 2026

@marcelotrevisani, this isn't perfect but I think that's absolutely minimal changes needed to make grayskull produce v0 recipes that pass the linter. I'm going to look into fixing conda-recipe-manager now.

Output `{{ python_min }}.*` rather than `{{ python_min }}` in `host` and
`test` dependencies, as conda-recipe-manager inlines the version when
updating the latter to the former.  Fixing it requires major
architecture changes (xref conda/conda-recipe-manager#307), so instead
emit the former directly.

While this is not a canonical form for v0 recipes, it is valid
(arguably, even more correct) and satisfies conda-smithy.

Signed-off-by: Michał Górny <[email protected]>
@mgorny
Copy link
Contributor Author

mgorny commented Jan 24, 2026

Okay, it's 100% ready now. As it turns out, using {{ python_min }}.* is correct for v0 and avoids issues with CRM.

I've also filed conda/conda-recipe-manager#473 to fix the remaining issues and get fully complaint test section.

Copy link
Member

@marcelotrevisani marcelotrevisani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks again for your contribution! :)

@marcelotrevisani marcelotrevisani merged commit dac990e into conda:main Jan 24, 2026
9 checks passed
@maresb
Copy link
Contributor

maresb commented Jan 24, 2026

Thanks @mgorny, this is very exciting and much appreciated!!!!!

@mgorny mgorny deleted the python-min branch January 24, 2026 19:36
@mgorny
Copy link
Contributor Author

mgorny commented Jan 24, 2026

Thanks. This is quite complex, so please don't hesitate to ping me if you notice any regressions.

That said, I think that's the last change I needed in grayskull, so if you could consider a new release anytime soon, that'd be helpful. The plan is to add a tutorial using grayskull and v1 recipes to conda-forge docs, and a prerequisite is that the recipes generated pass lint.

@maresb
Copy link
Contributor

maresb commented Jan 24, 2026

@mgorny, it's already been released, and already installable from conda-forge! 🚀

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.

[BUG] Implement CFEP-25 python_min

3 participants