os.realname variable for correct USER_SITE value (#410)

In site.py, Python uses os.name to decide where the USER_SITE (ie the
folder containing the user's locally installed packages) is located.
With cosmo we have set os.name as "posix" always, so we use a new
os.realname to decide the USER_SITE location.
This commit is contained in:
Gautham 2022-05-20 20:47:10 +05:30 committed by GitHub
parent c8a2f04058
commit fb4382e9a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -42,6 +42,7 @@ def _get_exports_list(module):
name = 'posix'
linesep = '\n'
realname = "nt" if cosmo.kernel == "nt" else "posix"
from posix import *
from posix import _exit
__all__.append('_exit')