From 58565fb6f18b87dc39ac08eba3f7f6091fba5f15 Mon Sep 17 00:00:00 2001 From: Jason Grout Date: Tue, 27 Sep 2022 05:01:42 -0600 Subject: [PATCH] Experiment: lowercase the appname for aix and linux At least some directories in unix are conventionally lowercase, so experiment with that convention. --- jupyter_core/paths.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/jupyter_core/paths.py b/jupyter_core/paths.py index 340a2243..f19388d4 100644 --- a/jupyter_core/paths.py +++ b/jupyter_core/paths.py @@ -24,6 +24,9 @@ from jupyter_core.utils import deprecation pjoin = os.path.join +APPNAME = "Jupyter" +if sys.platform.startswith("linux") or sys.platform.startswith("aix"): + APPNAME = APPNAME.lower() # UF_HIDDEN is a stat flag not defined in the stat module. # It is used by BSD to indicate hidden files. @@ -110,7 +113,7 @@ def jupyter_config_dir(): return env["JUPYTER_CONFIG_DIR"] if use_platform_dirs(): - return platformdirs.user_config_dir("Jupyter", appauthor=False) + return platformdirs.user_config_dir(APPNAME, appauthor=False) home_dir = get_home_dir() return pjoin(home_dir, ".jupyter") @@ -129,7 +132,7 @@ def jupyter_data_dir(): return env["JUPYTER_DATA_DIR"] if use_platform_dirs(): - return platformdirs.user_data_dir("Jupyter", False) + return platformdirs.user_data_dir(APPNAME, appauthor=False) home = get_home_dir() @@ -167,7 +170,7 @@ def jupyter_runtime_dir(): if use_platform_dirs(): SYSTEM_JUPYTER_PATH = platformdirs.site_data_dir( - "Jupyter", appauthor=False, multipath=True + APPNAME, appauthor=False, multipath=True ).split(os.pathsep) else: deprecation( @@ -256,7 +259,7 @@ def jupyter_path(*subdirs): if use_platform_dirs(): SYSTEM_CONFIG_PATH = platformdirs.site_config_dir( - "Jupyter", appauthor=False, multipath=True + APPNAME, appauthor=False, multipath=True ).split(os.pathsep) else: if os.name == "nt":