Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions conda_smithy/linter/conda_recipe_v1_linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from rattler_build_conda_compat.jinja.jinja import (
RecipeWithContext,
render_recipe_with_context,
resolve_recipe_metadata,
)
from rattler_build_conda_compat.outputs import is_staging_output

Expand Down Expand Up @@ -113,14 +113,14 @@ def hint_noarch_usage(


def get_recipe_name(recipe_content: RecipeWithContext) -> str:
rendered_context_recipe = render_recipe_with_context(recipe_content)
rendered_context_recipe = resolve_recipe_metadata(recipe_content)
package_name = rendered_context_recipe.get("package", {}).get("name", "").strip()
recipe_name = rendered_context_recipe.get("recipe", {}).get("name", "").strip()
return package_name or recipe_name


def get_recipe_version(recipe_content: RecipeWithContext) -> Optional[str]:
rendered_context_recipe = render_recipe_with_context(recipe_content)
rendered_context_recipe = resolve_recipe_metadata(recipe_content)
package_version = rendered_context_recipe.get("package", {}).get("version")
recipe_version = rendered_context_recipe.get("recipe", {}).get("version")

Expand Down
4 changes: 2 additions & 2 deletions conda_smithy/linter/lints.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from typing import Any, Literal, Optional

from conda.models.version import VersionOrder
from rattler_build_conda_compat.jinja.jinja import render_recipe_with_context
from rattler_build_conda_compat.jinja.jinja import resolve_recipe_metadata
from rattler_build_conda_compat.loader import parse_recipe_config_file
from ruamel.yaml import CommentedSeq

Expand Down Expand Up @@ -551,7 +551,7 @@ def lint_pin_subpackages(
recipe_version: int = 0,
):
if recipe_version == 1:
meta = render_recipe_with_context(meta)
meta = resolve_recipe_metadata(meta)
# use the rendered versions here
package_section = meta.get("package", {})
outputs_section = meta.get("outputs", [])
Expand Down
Loading