python-jupyter-core/use_rpms_paths.patch

51 lines
1.6 KiB
Diff
Raw Permalink Normal View History

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.5.1/jupyter_core/paths.py
===================================================================
--- jupyter_core-5.5.1.orig/jupyter_core/paths.py
+++ jupyter_core-5.5.1/jupyter_core/paths.py
@@ -221,10 +221,7 @@ else:
else: # PROGRAMDATA is not defined by default on XP.
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"))]
@@ -245,10 +242,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] = []
@@ -301,8 +298,7 @@ else:
SYSTEM_CONFIG_PATH = []
else:
SYSTEM_CONFIG_PATH = [
- "/usr/local/etc/jupyter",
- "/etc/jupyter",
+ "@_distconfdir_jupyter_@"
]
ENV_CONFIG_PATH: list[str] = [str(Path(sys.prefix, "etc", "jupyter"))]