bpo-41627: Distinguish 32 and 64-bit user site packages on Windows (GH-22098)

Also fixes the error message returned when sysconfig fails to interpolate a variable correctly.
This commit is contained in:
Steve Dower 2020-09-05 00:45:54 +01:00 committed by GitHub
parent 51b84f8e96
commit dd18001c30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 10 deletions

View file

@ -274,7 +274,8 @@ def _get_path(userbase):
version = sys.version_info
if os.name == 'nt':
return f'{userbase}\\Python{version[0]}{version[1]}\\site-packages'
ver_nodot = sys.winver.replace('.', '')
return f'{userbase}\\Python{ver_nodot}\\site-packages'
if sys.platform == 'darwin' and sys._framework:
return f'{userbase}/lib/python/site-packages'