]> granicus.if.org Git - python/commitdiff
Closes #23437: Make user scripts directory versioned on Windows (patch by pmoore)
authorSteve Dower <steve.dower@microsoft.com>
Sat, 14 Feb 2015 17:50:59 +0000 (09:50 -0800)
committerSteve Dower <steve.dower@microsoft.com>
Sat, 14 Feb 2015 17:50:59 +0000 (09:50 -0800)
Doc/install/index.rst
Lib/distutils/command/install.py
Lib/sysconfig.py
Tools/scripts/win_add2path.py

index 8f3ad7241af5dfc09a05383b0524669dee041e81..876f350f90e8b8c5e126d1424b9cab64d79c91bd 100644 (file)
@@ -361,7 +361,7 @@ And here are the values used on Windows:
 Type of file    Installation directory
 =============== ===========================================================
 modules         :file:`{userbase}\\Python{XY}\\site-packages`
-scripts         :file:`{userbase}\\Scripts`
+scripts         :file:`{userbase}\\Python{XY}\\Scripts`
 data            :file:`{userbase}`
 C headers       :file:`{userbase}\\Python{XY}\\Include\\{distname}`
 =============== ===========================================================
index d768dc5463340e7e01a6c44d65610816875e6899..67db007a0247342fabf1d8135112bb582fab37aa 100644 (file)
@@ -51,7 +51,7 @@ if HAS_USER_SITE:
         'purelib': '$usersite',
         'platlib': '$usersite',
         'headers': '$userbase/Python$py_version_nodot/Include/$dist_name',
-        'scripts': '$userbase/Scripts',
+        'scripts': '$userbase/Python$py_version_nodot/Scripts',
         'data'   : '$userbase',
         }
 
index c5f541b3d554c2b5c8ebdc740dbad8a38a266e44..137932ef784688ede8938f1ce9cf8d24945cee67 100644 (file)
@@ -57,7 +57,7 @@ _INSTALL_SCHEMES = {
         'purelib': '{userbase}/Python{py_version_nodot}/site-packages',
         'platlib': '{userbase}/Python{py_version_nodot}/site-packages',
         'include': '{userbase}/Python{py_version_nodot}/Include',
-        'scripts': '{userbase}/Scripts',
+        'scripts': '{userbase}/Python{py_version_nodot}/Scripts',
         'data': '{userbase}',
         },
     'posix_user': {
index c85bea576fe83a3f92cad5d3bac5a4a85bca83be..1c9aedc5ed8dcaeebb88fd895f95c6058bd7f51f 100644 (file)
@@ -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