Skip to content

Commit

Permalink
enable jpeg turbo for new recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv committed Aug 10, 2024
1 parent 809566e commit 3188eee
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions conda_forge_tick/migrators/jpegturbo.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@ def filter(self, attrs, not_bad_str_start=""):
return "jpeg" not in host_req

def migrate(self, recipe_dir, attrs, **kwargs):
fname = os.path.join(recipe_dir, "meta.yaml")
if os.path.exists(fname):
with open(fname) as fp:
lines = fp.readlines()
recipe_file = self.find_recipe(recipe_dir)

new_lines = _parse_jpeg(lines)
with open(fname, "w") as fp:
fp.write("".join(new_lines))
lines = recipe_file.read_text().splitlines(keepends=True)
new_lines = _parse_jpeg(lines)
recipe_file.write_text("".join(new_lines))

0 comments on commit 3188eee

Please sign in to comment.