Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-jupyter-builder for 
openSUSE:Factory checked in at 2026-12-02 17:06:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-jupyter-builder (Old)
 and      /work/SRC/openSUSE:Factory/.python-jupyter-builder.new.1340718 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-jupyter-builder"

Wed Dec  2 17:06:18 2026 rev:2 rq:1402304 version:1.3.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-jupyter-builder/python-jupyter-builder.changes
    2026-11-27 19:42:02.095299105 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-jupyter-builder.new.1340718/python-jupyter-builder.changes
       2026-12-02 17:08:53.213517636 +0100
@@ -1,0 +2,5 @@
+Tue Dec  1 15:11:49 UTC 2026 - Dominique Leuenberger <[email protected]>
+
+- Add jupyter-builder-offline-core-meta.patch: fallback to system JupyterLab 
core metadata when offline or remote download fails.
+
+-------------------------------------------------------------------

New:
----
  jupyter-builder-offline-core-meta.patch

----------(New B)----------
  New:
- Add jupyter-builder-offline-core-meta.patch: fallback to system JupyterLab 
core metadata when offline or remote download fails.
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-jupyter-builder.spec ++++++
--- /var/tmp/diff_new_pack.q3kaDW/_old  2026-12-02 17:08:54.321564524 +0100
+++ /var/tmp/diff_new_pack.q3kaDW/_new  2026-12-02 17:08:54.324564651 +0100
@@ -23,6 +23,8 @@
 License:        BSD-3-Clause
 URL:            https://github.com/jupyterlab/jupyter-builder
 Source:         
https://files.pythonhosted.org/packages/source/j/jupyter-builder/jupyter_builder-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM jupyter-builder-offline-core-meta.patch -- Fallback to 
system JupyterLab core metadata when offline/remote download fails
+Patch0:         jupyter-builder-offline-core-meta.patch
 BuildRequires:  python-rpm-macros
 BuildRequires:  %{python_module hatch-nodejs-version >= 0.3.2}
 BuildRequires:  %{python_module hatchling >= 1.21.1}

++++++ jupyter-builder-offline-core-meta.patch ++++++
--- a/jupyter_builder/core_path.py
+++ b/jupyter_builder/core_path.py
@@ -7,6 +7,7 @@
 import json
 import logging
 import os
+import sys
 import re
 import tarfile
 import urllib.error
@@ -58,12 +59,38 @@
         return bytes(resp.read())


+def _get_system_core_meta() -> Path | None:
+    env_override = os.environ.get("JUPYTERLAB_CORE_PACKAGE_JSON")
+    if env_override:
+        p = Path(env_override)
+        if p.exists():
+            return p
+    try:
+        import jupyterlab
+        staging_pkg = Path(jupyterlab.__file__).parent / "staging" / 
"package.json"
+        if staging_pkg.exists():
+            return staging_pkg
+    except Exception:
+        pass
+    for candidate in [
+        Path(sys.prefix) / "share" / "jupyter" / "lab" / "staging" / 
"package.json",
+        Path("/usr/share/jupyter/lab/staging/package.json"),
+        Path("/usr/share/jupyter/lab/static/package.json"),
+    ]:
+        if candidate.exists():
+            return candidate
+    return None
+
+
 def get_core_meta(
     version: str | None = None,
     ext_path: str | os.PathLike[str] | None = None,
     logger: logging.Logger | None = None,
 ) -> str:
     """Return the path to the core package JSON, downloading it if needed."""
+    env_override = os.environ.get("JUPYTERLAB_CORE_PACKAGE_JSON")
+    if env_override and Path(env_override).exists():
+        return str(Path(env_override).resolve())
     if version is not None:
         # Accept both "vX.Y.Z" and "X.Y.Z" for an explicitly requested 
version, as
         # well as npm range specifiers such as "4", "4.5" or "^4.3.6 || 
^3.6.8".
@@ -102,6 +129,17 @@
                 return str(github_cache_file)
             _download_github_core_meta(_github_ref(github_version), 
github_cache_file)
         except urllib.error.URLError as github_error:
+            sys_core = _get_system_core_meta()
+            if sys_core is not None:
+                if logger:
+                    logger.warning(
+                        "Could not resolve @jupyterlab/core-meta remotely (%s; 
%s); "
+                        "falling back to system JupyterLab core metadata at 
%s",
+                        npm_error,
+                        github_error,
+                        sys_core,
+                    )
+                return str(sys_core)
             msg = (
                 f"Could not resolve @jupyterlab/core-meta for requested 
version "
                 f"{requested_version!r}: not found on the npm registry "

Reply via email to