Skip to content

Commit

Permalink
Merge pull request #3001 from isuruf/ucrt
Browse files Browse the repository at this point in the history
Fix filter for ucrt and fix posix
  • Loading branch information
isuruf authored Sep 17, 2024
2 parents a1942f2 + 0634ed5 commit 59c1233
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions conda_forge_tick/migrators/r_ucrt.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ def _cleanup_raw_yaml(raw_yaml):
line = line.replace("{{native}}", "")
line = line.replace("{{posix}}pkg-config", "pkg-config")
line = line.replace("{{ posix }}pkg-config", "pkg-config")
line = line.replace("- m2w64-pkg-config", "pkg-config")
line = line.replace("- m2w64-toolchain", "- {{ compiler('m2w64_c') }}")
line = line.replace("- posix", "- m2-base")
if "merge_build_host: " in line:
continue
if "- gcc-libs" in line:
continue
if "- posix" in line:
continue
if "set native =" in line:
continue
if re.search(r"\s*skip: (T|t)rue\s+\# \[win\]", line):
Expand All @@ -44,7 +44,10 @@ class RUCRTCleanup(MiniMigrator):
"""Cleanup the R recipes for ucrt"""

def filter(self, attrs: "AttrsTypedDict", not_bad_str_start: str = "") -> bool:
return "native" not in attrs.get("raw_meta_yaml", "")
return not any(
w in attrs.get("raw_meta_yaml", "")
for w in ["native", "- posix", "- m2w64"]
)

def migrate(self, recipe_dir: str, attrs: "AttrsTypedDict", **kwargs: Any) -> None:
with pushd(recipe_dir):
Expand Down

0 comments on commit 59c1233

Please sign in to comment.