From c117ebad04e402cd94fe4987f579bfd169bc517e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20M=C3=A4usezahl?= Date: Wed, 10 Feb 2021 02:08:33 +0100 Subject: [PATCH] conf: Change default cache directory on Windows. (#5537) The default cache directory should not be in the Roaming profile (%APPDATA%) but much rather in the Local profile (%LOCALAPPDATA%) since there is no need to synchronize it between computers. --- PyInstaller/configure.py | 2 +- news/5537.bugfix.rst | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 news/5537.bugfix.rst diff --git a/PyInstaller/configure.py b/PyInstaller/configure.py index 530ff8ad4c..e56350f547 100644 --- a/PyInstaller/configure.py +++ b/PyInstaller/configure.py @@ -65,7 +65,7 @@ def _get_pyinst_cache_dir(): if compat.getenv('PYINSTALLER_CONFIG_DIR'): cache_dir = compat.getenv('PYINSTALLER_CONFIG_DIR') elif is_win: - cache_dir = compat.getenv('APPDATA') + cache_dir = compat.getenv('LOCALAPPDATA') if not cache_dir: cache_dir = os.path.expanduser('~\\Application Data') elif is_darwin: diff --git a/news/5537.bugfix.rst b/news/5537.bugfix.rst new file mode 100644 index 0000000000..fc1e5131c6 --- /dev/null +++ b/news/5537.bugfix.rst @@ -0,0 +1,6 @@ +(Windows) Change default cache directory to ``LOCALAPPDATA`` +(from the original ``APPDATA``). +This is to make sure that cached data +doesn't get synced with the roaming profile. +For this and future versions ``AppData\Roaming\pyinstaller`` +might be safely deleted. \ No newline at end of file