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.

62 lines
2.0KB

  1. diff -Naur Python-3.8.0-orig/Lib/sysconfig.py Python-3.8.0/Lib/sysconfig.py
  2. --- Python-3.8.0-orig/Lib/sysconfig.py 2019-10-22 10:01:57.159242500 +0300
  3. +++ Python-3.8.0/Lib/sysconfig.py 2019-10-22 10:02:07.580060800 +0300
  4. @@ -97,6 +97,9 @@
  5. _CONFIG_VARS = None
  6. _USER_BASE = None
  7. +# GCC[mingw*] use posix build system
  8. +_POSIX_BUILD = os.name == 'posix' or \
  9. + (os.name == "nt" and 'GCC' in sys.version)
  10. def _safe_realpath(path):
  11. try:
  12. @@ -180,7 +183,7 @@
  13. def _get_default_scheme():
  14. - if os.name == 'posix':
  15. + if _POSIX_BUILD:
  16. # the default scheme for posix is posix_prefix
  17. return 'posix_prefix'
  18. return os.name
  19. @@ -196,7 +199,7 @@
  20. def joinuser(*args):
  21. return os.path.expanduser(os.path.join(*args))
  22. - if os.name == "nt":
  23. + if os.name == "nt" and not _POSIX_BUILD:
  24. base = os.environ.get("APPDATA") or "~"
  25. return joinuser(base, "Python")
  26. @@ -493,7 +496,7 @@
  27. def get_config_h_filename():
  28. """Return the path of pyconfig.h."""
  29. if _PYTHON_BUILD:
  30. - if os.name == "nt":
  31. + if os.name == "nt" and not _POSIX_BUILD:
  32. inc_dir = os.path.join(_sys_home or _PROJECT_BASE, "PC")
  33. else:
  34. inc_dir = _sys_home or _PROJECT_BASE
  35. @@ -564,9 +567,9 @@
  36. # sys.abiflags may not be defined on all platforms.
  37. _CONFIG_VARS['abiflags'] = ''
  38. - if os.name == 'nt':
  39. + if os.name == 'nt' and not _POSIX_BUILD:
  40. _init_non_posix(_CONFIG_VARS)
  41. - if os.name == 'posix':
  42. + if _POSIX_BUILD:
  43. _init_posix(_CONFIG_VARS)
  44. # For backward compatibility, see issue19555
  45. SO = _CONFIG_VARS.get('EXT_SUFFIX')
  46. @@ -579,7 +582,7 @@
  47. # Always convert srcdir to an absolute path
  48. srcdir = _CONFIG_VARS.get('srcdir', _PROJECT_BASE)
  49. - if os.name == 'posix':
  50. + if _POSIX_BUILD:
  51. if _PYTHON_BUILD:
  52. # If srcdir is a relative path (typically '.' or '..')
  53. # then it should be interpreted relative to the directory