Skip to content

Commit

Permalink
Update packages.json for user-specified packages (#44)
Browse files Browse the repository at this point in the history
Line 146 of `get-pyodide.py` overwrites the user-specified `packages` variable and line 149 only keeps the default packages, ignoring the user-specified ones. The result is that user-specified packages are fetched, but are not importable.

Extend the default global `PACKAGES` variable with the user-specified packages and use this variable when referencing packages to fetch and include.
  • Loading branch information
mogenson authored Nov 5, 2021
1 parent bcd272b commit f0b9ef7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/get-pyodide.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@
PACKAGES = []

# Allow to install additional Pyodide pre-built packages by command-line arguments
packages = PACKAGES + (args.packages or [])
PACKAGES += (args.packages or [])

if is_nano and packages:
if is_nano and PACKAGES:
raise EnvironmentError("Pyodide-nano does not support additionaly packages currently!")

for package in packages:
for package in PACKAGES:
FILES.extend(
[
f"{package}.data",
Expand Down

0 comments on commit f0b9ef7

Please # to comment.