diff options
author | Steve Dower <steve.dower@microsoft.com> | 2015-02-14 17:50:59 (GMT) |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2015-02-14 17:50:59 (GMT) |
commit | 17be514d0a9a391461fbbdb06332d7b2b8273374 (patch) | |
tree | 0e5e419b457fe42ab89eca5e6440a99bbb1d399f /Tools | |
parent | a9076d655134386ddc7f9fca40c926a102f35b84 (diff) | |
download | cpython-17be514d0a9a391461fbbdb06332d7b2b8273374.zip cpython-17be514d0a9a391461fbbdb06332d7b2b8273374.tar.gz cpython-17be514d0a9a391461fbbdb06332d7b2b8273374.tar.bz2 |
Closes #23437: Make user scripts directory versioned on Windows (patch by pmoore)
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/scripts/win_add2path.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Tools/scripts/win_add2path.py b/Tools/scripts/win_add2path.py index c85bea5..1c9aedc 100644 --- a/Tools/scripts/win_add2path.py +++ b/Tools/scripts/win_add2path.py @@ -22,7 +22,8 @@ def modify(): scripts = os.path.join(pythonpath, "Scripts") appdata = os.environ["APPDATA"] if hasattr(site, "USER_SITE"): - userpath = site.USER_SITE.replace(appdata, "%APPDATA%") + usersite = site.USER_SITE.replace(appdata, "%APPDATA%") + userpath = os.path.dirname(usersite) userscripts = os.path.join(userpath, "Scripts") else: userscripts = None |