Skip to content

Commit

Permalink
Remove tests folder for pyodide wheel (#7276)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed Sep 15, 2024
1 parent 816fcd9 commit d57d393
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions scripts/build_pyodide_wheels.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,16 @@
raise RuntimeError("Panel wheel not found.")
panel_wheel = sorted(panel_wheels)[-1]

if bokeh_dev:
zin = zipfile.ZipFile(panel_wheel, "r")
zout = zipfile.ZipFile(out / os.path.basename(panel_wheel).replace(".dirty", ""), "w")
with (
zipfile.ZipFile(panel_wheel, "r") as zin,
zipfile.ZipFile(out / os.path.basename(panel_wheel).replace(".dirty", ""), "w") as zout,
):
for item in zin.infolist():
filename = item.filename
if filename.startswith("panel/tests"):
continue
buffer = zin.read(filename)
if filename.startswith("panel-") and filename.endswith("METADATA"):
if bokeh_dev and filename.startswith("panel-") and filename.endswith("METADATA"):
lines = buffer.decode("utf-8").split("\n")
lines = [
f"Requires-Dist: {bokeh_requirement}"
Expand All @@ -86,8 +89,6 @@
]
buffer = "\n".join(lines).encode('utf-8')
zout.writestr(item, buffer)
else:
shutil.copyfile(panel_wheel, out / os.path.basename(panel_wheel).replace(".dirty", ""))

bokeh_wheels = PANEL_BASE.glob("build/bokeh-*-py3-none-any.whl")

Expand Down

0 comments on commit d57d393

Please sign in to comment.