mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Closes #23437: Make user scripts directory versioned on Windows (patch by pmoore)
This commit is contained in:
parent
a9076d6551
commit
17be514d0a
4 changed files with 5 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue