Skip to content

Add support for generating v1 recipes#5919

Open
jsmolic wants to merge 1 commit intoconda:mainfrom
jsmolic:v1-recipe-generation
Open

Add support for generating v1 recipes#5919
jsmolic wants to merge 1 commit intoconda:mainfrom
jsmolic:v1-recipe-generation

Conversation

@jsmolic
Copy link
Copy Markdown
Contributor

@jsmolic jsmolic commented Feb 6, 2026

This PR adds support for generating v1 recipes using conda-recipe-manager to convert recipes generated with conda-skeleton to the newer format.

Description

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@jsmolic jsmolic requested a review from a team as a code owner February 6, 2026 14:02
@github-project-automation github-project-automation bot moved this to 🆕 New in 🔎 Review Feb 6, 2026
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Feb 6, 2026
This PR adds support for generating v1 recipes using
`conda-recipe-manager` to convert recipes generated with
`conda-skeleton` to the newer format.
Copy link
Copy Markdown
Contributor

@beckermr beckermr left a comment

Choose a reason for hiding this comment

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

We should not merge this. Instead we should centralize around grayskull and move all recipe generation to that package.

@github-project-automation github-project-automation bot moved this from 🆕 New to 🏗️ In Progress in 🔎 Review Feb 6, 2026
@jaimergp
Copy link
Copy Markdown
Member

jaimergp commented Feb 6, 2026

This is coming from #5880. Initially the integration strategy used rattler-build directly, but Isuru suggested to convert whatever skeleton was creating for meta.yaml into recipe.yaml via conda-recipe-manager.

I don't see it as controversial, but if this is not going in, we should think of deprecating skeleton fully.

@beckermr
Copy link
Copy Markdown
Contributor

beckermr commented Feb 6, 2026

Yes, I think we should split out recipe generation in the same way we split out conda-index.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Feb 6, 2026

Merging this PR will not alter performance

✅ 5 untouched benchmarks


Comparing jsmolic:v1-recipe-generation (ff0ce08) with main (4dc1fac)

Open in CodSpeed

@schuylermartin45
Copy link
Copy Markdown
Contributor

This is coming from #5880. Initially the integration strategy used rattler-build directly, but Isuru suggested to convert whatever skeleton was creating for meta.yaml into recipe.yaml via conda-recipe-manager.

I don't see it as controversial, but if this is not going in, we should think of deprecating skeleton fully.

I don't know much about the history of skeleton and not to add more fuel to this fire, but I would hope one day that we could build a crm bootstrap command that would serve the same purpose. It just seems like a logical direction to go in when we already have crm bump-recipe and plan support V1 recipes someday.

If anyone wants to give that a try, I would be very grateful and would happily review that PR. I would personally look at the crm convert logic as inspiration, as it should be as simple as calling a number of RecipeParser::patch() with add commands over and over again. The parser might actually be able to support most of a V1 "skeleton" recipe so long as nobody tries to use a V1 selector.

@jaimergp
Copy link
Copy Markdown
Member

Related issue #4460

@jaimergp
Copy link
Copy Markdown
Member

If anyone wants to split conda-skeleton, these are the components to look at:

Full files:

conda_build/cli/main_skeleton.py
conda_build/skeletons/**
tests/test-skeleton/**
tests/test_api_skeleton_cpan.py
tests/test_api_skeleton_cran.py
tests/test_api_skeleton.py
tests/test_cpan_skeleton.py
tests/test_cran_skeleton.py
tests/test_pypi_skeleton.py
docs/source/resources/commands/conda-skeleton-cpan.rst
docs/source/resources/commands/conda-skeleton-cran.rst
docs/source/resources/commands/conda-skeleton-luarocks.rst
docs/source/resources/commands/conda-skeleton-pypi.rst
docs/source/resources/commands/conda-skeleton.rst

Functions:

conda_build.api::list_skeletons
conda_build.api::skeletonize
conda_build.plugin::skeleton

@schuylermartin45
Copy link
Copy Markdown
Contributor

This is coming from #5880. Initially the integration strategy used rattler-build directly, but Isuru suggested to convert whatever skeleton was creating for meta.yaml into recipe.yaml via conda-recipe-manager.
I don't see it as controversial, but if this is not going in, we should think of deprecating skeleton fully.

I don't know much about the history of skeleton and not to add more fuel to this fire, but I would hope one day that we could build a crm bootstrap command that would serve the same purpose. It just seems like a logical direction to go in when we already have crm bump-recipe and plan support V1 recipes someday.

If anyone wants to give that a try, I would be very grateful and would happily review that PR. I would personally look at the crm convert logic as inspiration, as it should be as simple as calling a number of RecipeParser::patch() with add commands over and over again. The parser might actually be able to support most of a V1 "skeleton" recipe so long as nobody tries to use a V1 selector.

To add to this thought, a crm bootstrap would look something along the lines of this psuedo code:

# Or `RecipeParserDeps` if dependency functions are needed.
from conda_recipe_manager.parser.recipe_parser import RecipeParser
from pathlib import Path

parser = RecipeParser("")

parser.set_variable("version", "1.2.3")

parser.patch({"op": "add", "path": "/build", "value": {})
parser.patch({"op": "add", "path": "/build/number", "value": 0)
# Do this for all values you could want, branch on V0/V1 ...

Path("/path/to/recipe/file/meta.yaml").write_text(parser.render(), encoding="utf-8")

Tracking this idea here: conda/conda-recipe-manager#482

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed [bot] added once the contributor has signed the CLA

Projects

Status: 🏗️ In Progress

Development

Successfully merging this pull request may close these issues.

5 participants