1
0
python-jupyter-core/use_rpms_paths.patch

51 lines
1.6 KiB
Diff
Raw 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:
- Update to 5.1.1 * Only prefer envs owned by the current user #323 (@minrk) * Don't treat the conda root env as an env #324 (@minrk) - Release 5.1.0 * Add run_sync and ensure_async functions #315 (@davidbrochart) - Release 5.0.0 ## Major Changes * Prefer Environment Level Configuration. We now make the assumption that if we are running in a virtual environment, we * should prioritize the environment-level sys.prefix over the user-level paths. Users can opt out of this behavior by setting JUPYTER_PREFER_ENV_PATH, which takes precedence over our autodetection. * Migrate to Standard Platform Directories. In version 5, we introduce a JUPYTER_PLATFORM_DIRS environment variable to opt in * to using more appropriate platform-specific directories. We raise a deprecation warning if the variable is not set. In version 6, JUPYTER_PLATFORM_DIRS will be opt-out. In version 7, we will remove the environment variable checks and old directory logic. * Drop Support for Python 3.7 * We are dropping support for Python 3.7 ahead of its official end of life, to reduce * maintenance burden as we add support for Python 3.11. * Use platformdirs for path locations #292 (@blink1073) * Try to detect if we are in a virtual environment and change path precedence * accordingly #286 (@jasongrout) * Add current working directory as first config path #291 (@blink1073) * Fix inclusion of jupyter file and check in CI #276 (@blink1073) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-core?expand=0&rev=28
2022-12-25 20:40:52 +00:00
else: # PROGRAMDATA is not defined by default on XP.
SYSTEM_JUPYTER_PATH = [str(Path(sys.prefix, "share", "jupyter"))]
- Update to 5.1.1 * Only prefer envs owned by the current user #323 (@minrk) * Don't treat the conda root env as an env #324 (@minrk) - Release 5.1.0 * Add run_sync and ensure_async functions #315 (@davidbrochart) - Release 5.0.0 ## Major Changes * Prefer Environment Level Configuration. We now make the assumption that if we are running in a virtual environment, we * should prioritize the environment-level sys.prefix over the user-level paths. Users can opt out of this behavior by setting JUPYTER_PREFER_ENV_PATH, which takes precedence over our autodetection. * Migrate to Standard Platform Directories. In version 5, we introduce a JUPYTER_PLATFORM_DIRS environment variable to opt in * to using more appropriate platform-specific directories. We raise a deprecation warning if the variable is not set. In version 6, JUPYTER_PLATFORM_DIRS will be opt-out. In version 7, we will remove the environment variable checks and old directory logic. * Drop Support for Python 3.7 * We are dropping support for Python 3.7 ahead of its official end of life, to reduce * maintenance burden as we add support for Python 3.11. * Use platformdirs for path locations #292 (@blink1073) * Try to detect if we are in a virtual environment and change path precedence * accordingly #286 (@jasongrout) * Add current working directory as first config path #291 (@blink1073) * Fix inclusion of jupyter file and check in CI #276 (@blink1073) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-core?expand=0&rev=28
2022-12-25 20:40:52 +00:00
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:
- Update to 5.1.1 * Only prefer envs owned by the current user #323 (@minrk) * Don't treat the conda root env as an env #324 (@minrk) - Release 5.1.0 * Add run_sync and ensure_async functions #315 (@davidbrochart) - Release 5.0.0 ## Major Changes * Prefer Environment Level Configuration. We now make the assumption that if we are running in a virtual environment, we * should prioritize the environment-level sys.prefix over the user-level paths. Users can opt out of this behavior by setting JUPYTER_PREFER_ENV_PATH, which takes precedence over our autodetection. * Migrate to Standard Platform Directories. In version 5, we introduce a JUPYTER_PLATFORM_DIRS environment variable to opt in * to using more appropriate platform-specific directories. We raise a deprecation warning if the variable is not set. In version 6, JUPYTER_PLATFORM_DIRS will be opt-out. In version 7, we will remove the environment variable checks and old directory logic. * Drop Support for Python 3.7 * We are dropping support for Python 3.7 ahead of its official end of life, to reduce * maintenance burden as we add support for Python 3.11. * Use platformdirs for path locations #292 (@blink1073) * Try to detect if we are in a virtual environment and change path precedence * accordingly #286 (@jasongrout) * Add current working directory as first config path #291 (@blink1073) * Fix inclusion of jupyter file and check in CI #276 (@blink1073) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-core?expand=0&rev=28
2022-12-25 20:40:52 +00:00
SYSTEM_CONFIG_PATH = []
else:
SYSTEM_CONFIG_PATH = [
- Update to 5.1.1 * Only prefer envs owned by the current user #323 (@minrk) * Don't treat the conda root env as an env #324 (@minrk) - Release 5.1.0 * Add run_sync and ensure_async functions #315 (@davidbrochart) - Release 5.0.0 ## Major Changes * Prefer Environment Level Configuration. We now make the assumption that if we are running in a virtual environment, we * should prioritize the environment-level sys.prefix over the user-level paths. Users can opt out of this behavior by setting JUPYTER_PREFER_ENV_PATH, which takes precedence over our autodetection. * Migrate to Standard Platform Directories. In version 5, we introduce a JUPYTER_PLATFORM_DIRS environment variable to opt in * to using more appropriate platform-specific directories. We raise a deprecation warning if the variable is not set. In version 6, JUPYTER_PLATFORM_DIRS will be opt-out. In version 7, we will remove the environment variable checks and old directory logic. * Drop Support for Python 3.7 * We are dropping support for Python 3.7 ahead of its official end of life, to reduce * maintenance burden as we add support for Python 3.11. * Use platformdirs for path locations #292 (@blink1073) * Try to detect if we are in a virtual environment and change path precedence * accordingly #286 (@jasongrout) * Add current working directory as first config path #291 (@blink1073) * Fix inclusion of jupyter file and check in CI #276 (@blink1073) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-core?expand=0&rev=28
2022-12-25 20:40:52 +00:00
- "/usr/local/etc/jupyter",
- "/etc/jupyter",
+ "@_distconfdir_jupyter_@"
]
ENV_CONFIG_PATH: list[str] = [str(Path(sys.prefix, "etc", "jupyter"))]