Skip to content
Open
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
21 changes: 19 additions & 2 deletions conda_forge_tick/migrators/arch.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import typing
from pathlib import Path
from textwrap import dedent
from typing import Any, Optional, Sequence

Expand Down Expand Up @@ -91,6 +92,7 @@ class ArchRebuild(GraphMigrator):
rerender = True
# We purposefully don't want to bump build number for this migrator
bump_number = 0
allowed_schema_versions = [0, 1]
ignored_packages = {
"make",
"perl",
Expand Down Expand Up @@ -202,8 +204,15 @@ def filter(self, attrs: "AttrsTypedDict", not_bad_str_start: str = "") -> bool:
def migrate(
self, recipe_dir: str, attrs: "AttrsTypedDict", **kwargs: Any
) -> "MigrationUidTypedDict":
recipe_dir_path = Path(recipe_dir)
with pushd(recipe_dir + "/.."):
self.set_build_number("recipe/meta.yaml")
if (recipe_dir_path / "recipe/meta.yaml").exists():
self.set_build_number("recipe/meta.yaml")
elif (recipe_dir_path / "recipe/recipe.yaml").exists():
self.set_build_number("recipe/recipe.yaml")
else:
raise FileNotFoundError("No meta.yaml or recipe.yaml found")

with open("conda-forge.yml") as f:
y = yaml_safe_load(f)
if "provider" not in y:
Expand Down Expand Up @@ -247,6 +256,7 @@ class OSXArm(GraphMigrator):
rerender = True
# We purposefully don't want to bump build number for this migrator
bump_number = 0
allowed_schema_versions = [0, 1]

ignored_packages = set()
excluded_dependencies = set()
Expand Down Expand Up @@ -375,8 +385,15 @@ def filter(self, attrs: "AttrsTypedDict", not_bad_str_start: str = "") -> bool:
def migrate(
self, recipe_dir: str, attrs: "AttrsTypedDict", **kwargs: Any
) -> "MigrationUidTypedDict":
recipe_dir_path = Path(recipe_dir)
with pushd(recipe_dir + "/.."):
self.set_build_number("recipe/meta.yaml")
if (recipe_dir_path / "recipe/meta.yaml").exists():
self.set_build_number("recipe/meta.yaml")
elif (recipe_dir_path / "recipe/recipe.yaml").exists():
self.set_build_number("recipe/recipe.yaml")
else:
raise FileNotFoundError("No meta.yaml or recipe.yaml found")

with open("conda-forge.yml") as f:
y = yaml_safe_load(f)
# we should do this recursively but the cf yaml is usually
Expand Down