Cross-Platform build scripts for audio plugins
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.3KB

  1. diff -Naur Python-3.8.0-orig/Lib/site.py Python-3.8.0/Lib/site.py
  2. --- Python-3.8.0-orig/Lib/site.py 2019-10-14 16:34:47.000000000 +0300
  3. +++ Python-3.8.0/Lib/site.py 2019-10-22 10:02:21.776085800 +0300
  4. @@ -251,7 +251,8 @@
  5. def joinuser(*args):
  6. return os.path.expanduser(os.path.join(*args))
  7. - if os.name == "nt":
  8. + from sysconfig import _POSIX_BUILD
  9. + if os.name == "nt" and not _POSIX_BUILD:
  10. base = os.environ.get("APPDATA") or "~"
  11. return joinuser(base, "Python")
  12. @@ -266,7 +267,8 @@
  13. def _get_path(userbase):
  14. version = sys.version_info
  15. - if os.name == 'nt':
  16. + from sysconfig import _POSIX_BUILD
  17. + if sys.platform == 'win32' and not _POSIX_BUILD:
  18. return f'{userbase}\\Python{version[0]}{version[1]}\\site-packages'
  19. if sys.platform == 'darwin' and sys._framework:
  20. @@ -329,12 +331,13 @@
  21. if prefixes is None:
  22. prefixes = PREFIXES
  23. + from sysconfig import _POSIX_BUILD
  24. for prefix in prefixes:
  25. if not prefix or prefix in seen:
  26. continue
  27. seen.add(prefix)
  28. - if os.sep == '/':
  29. + if _POSIX_BUILD:
  30. sitepackages.append(os.path.join(prefix, "lib",
  31. "python%d.%d" % sys.version_info[:2],
  32. "site-packages"))