From 53e53578e707f2c76153cee4bcefdbedca3c5eb4 Mon Sep 17 00:00:00 2001 From: Juniper Tyree <50025784+juntyr@users.noreply.github.com> Date: Thu, 31 Oct 2024 08:20:35 +0000 Subject: [PATCH] Only warn for suspicious package names for now --- tools/requirements.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/requirements.py b/tools/requirements.py index 315d3f54..a03e0118 100644 --- a/tools/requirements.py +++ b/tools/requirements.py @@ -1,4 +1,5 @@ import json +import sys from pathlib import Path lock_path = Path("pyodide") / "dist" / "pyodide-lock.json" @@ -18,10 +19,12 @@ "matplotlib-pyodide", # pyodide implementation detail "micropip", # pyodide implementation detail "pyodide-http", # pyodide implementation detail + "widgetsnbextension", # JupyterLite mock with fake version ] PACKAGE_PYPI_NAME_FIXES = { "fiona": "fiona", # no-op, otherwise a false positive + "Jinja2": "Jinja2", # no-op, otherwise a false positive "markdown": "Markdown", "netcdf4": "netCDF4", "Pillow": "pillow", @@ -47,8 +50,9 @@ name_guess = package["file_name"].split("-")[0] if name_guess != package["name"].replace("-", "_"): if package["name"] not in PACKAGE_PYPI_NAME_FIXES: - raise Exception( - f"Suspicious package name {package['name']} with filename {name_guess}" + print( + f"Suspicious package name {package['name']} with filename {name_guess}", + sys.stderr, ) packages[name] = package["version"]