Skip to content

Commit 419186d

Browse files
hoxbrophilippjfr
andauthored
fix: Jupyterlite not having narwhals as depends (#7888)
Co-authored-by: Philipp Rudiger <[email protected]>
1 parent 1d394bc commit 419186d

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
[
2-
"https://cdn.holoviz.org/panel/wheels/panel-1.5.5-py3-none-any.whl",
3-
"pyodide-http"
2+
"https://cdn.holoviz.org/panel/wheels/panel-1.5.5-py3-none-any.whl"
43
]

scripts/jupyterlite/package-lock.json

Lines changed: 8 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/jupyterlite/patch_lock.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ def calculate_sha256(file_path):
1717
return sha256_hash.hexdigest()
1818

1919

20-
with open("package.json") as f:
20+
with open("package-lock.json") as f:
2121
package = json.load(f)
22-
pyodide_version = package["dependencies"]["pyodide"].removeprefix("^")
22+
pyodide_version = package["packages"]["node_modules/pyodide"]["version"]
2323

2424
path = "pyodide-lock.json"
2525
url = f"https://cdn.jsdelivr.net/pyodide/v{pyodide_version}/full"
@@ -42,6 +42,11 @@ def calculate_sha256(file_path):
4242
package["sha256"] = calculate_sha256(whl_file)
4343
package["imports"] = [name]
4444

45+
# Can be removed when micropip 0.9.0 is part of pyodide
46+
bokeh_req = data["packages"]["bokeh"]["depends"]
47+
if "narwhals" not in bokeh_req:
48+
bokeh_req.append("narwhals")
49+
4550

4651
with open(path, "w") as f:
4752
data = json.dump(data, f)

0 commit comments

Comments
 (0)