From a5d16643bc1bcc7358c799d79e61dce76694c861 Mon Sep 17 00:00:00 2001 From: Marc Wouts Date: Tue, 26 May 2020 05:35:14 +0200 Subject: [PATCH] Use USERSPROFILE and ALLUSERSPROFILE on Windows --- jupytext/config.py | 4 ++++ jupytext/version.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/jupytext/config.py b/jupytext/config.py index acd177c0c..4494ad10f 100644 --- a/jupytext/config.py +++ b/jupytext/config.py @@ -183,12 +183,16 @@ def global_jupytext_configuration_directories(): if "XDG_CONFIG_HOME" in os.environ: config_dirs.extend(os.environ["XDG_CONFIG_HOME"].split(":")) + elif "USERPROFILE" in os.environ: + config_dirs.append(os.environ["USERPROFILE"]) elif "HOME" in os.environ: config_dirs.append(os.path.join(os.environ["HOME"], ".config")) config_dirs.append(os.environ["HOME"]) if "XDG_CONFIG_DIRS" in os.environ: config_dirs.extend(os.environ["XDG_CONFIG_DIRS"].split(":")) + elif "ALLUSERSPROFILE" in os.environ: + config_dirs.append(os.environ["ALLUSERSPROFILE"]) else: config_dirs.extend(["/usr/local/share/", "/usr/share/"]) diff --git a/jupytext/version.py b/jupytext/version.py index 00a3117b8..7e178e2f7 100644 --- a/jupytext/version.py +++ b/jupytext/version.py @@ -1,3 +1,3 @@ """Jupytext's version number""" -__version__ = "1.5.0.rc1" +__version__ = "1.5.0.rc1+dev"