File use_rpms_paths.patch of Package python-jupyter-core

From: toddrme2178@gmail.com
Date: 2017-09-20
Subject: Use rpm paths

Use single-line paths. These must be replaced with the appropriate
system paths in the .spec file.

---

Index: jupyter_core-5.8.1/jupyter_core/paths.py
===================================================================
--- jupyter_core-5.8.1.orig/jupyter_core/paths.py
+++ jupyter_core-5.8.1/jupyter_core/paths.py
@@ -241,10 +241,7 @@ else:
         else:
             SYSTEM_JUPYTER_PATH = [str(Path(sys.prefix, "share", "jupyter"))]
     else:
-        SYSTEM_JUPYTER_PATH = [
-            "/usr/local/share/jupyter",
-            "/usr/share/jupyter",
-        ]
+        SYSTEM_JUPYTER_PATH = [ "@_datadir_jupyter_@" ]
 
 ENV_JUPYTER_PATH: list[str] = [str(Path(sys.prefix, "share", "jupyter"))]
 
@@ -286,10 +283,10 @@ def jupyter_path(*subdirs: str) -> list[
 
     Examples:
 
-    >>> jupyter_path()
-    ['~/.local/jupyter', '/usr/local/share/jupyter']
-    >>> jupyter_path('kernels')
-    ['~/.local/jupyter/kernels', '/usr/local/share/jupyter/kernels']
+    >>> jupyter_path()  # doctest: +SKIP
+    ['~/.local/share/jupyter', '@_datadir_jupyter_@']
+    >>> jupyter_path('kernels')  # doctest: +SKIP
+    ['~/.local/share/jupyter/kernels', '@_datadir_jupyter_@/kernels']
     """
 
     paths: list[str] = []
@@ -383,8 +380,8 @@ def jupyter_config_path() -> list[str]:
 
     Examples:
 
-    >>> jupyter_config_path()
-    ['~/.jupyter', '~/.local/etc/jupyter', '/usr/local/etc/jupyter', '/etc/jupyter']
+    >>> jupyter_config_path()  # doctest: +SKIP
+    ['~/.jupyter', '~/.local/etc/jupyter', "@_distconfdir_jupyter_@"]
 
     """
     if os.environ.get("JUPYTER_NO_CONFIG"):
openSUSE Build Service is sponsored by