Skip to content

Commit

Permalink
Add pinned key to opt out of autoupdates
Browse files Browse the repository at this point in the history
  • Loading branch information
hoodmane committed Jan 23, 2025
1 parent 7ebf9a2 commit b4d7726
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyodide_build/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class _PackageSpec(BaseModel):
top_level: list[str] = Field([], alias="top-level")
tag: list[str] = Field([])
disabled: bool = Field(False, alias="_disabled")
pinned: bool = Field(False, alias="_pinned")
model_config = ConfigDict(extra="forbid")


Expand Down
3 changes: 3 additions & 0 deletions pyodide_build/mkpkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ def update_package(
if "url" not in yaml_content["source"]:
raise MkpkgSkipped(f"{package} is a local package!")

if yaml_content["package"].get("pinned", False):
raise MkpkgSkipped(f"{package} is pinned!")

if yaml_content["source"]["url"].endswith("whl"):
old_fmt = "wheel"
else:
Expand Down

0 comments on commit b4d7726

Please sign in to comment.