diff -Naur Python-3.8.0-orig/Lib/sysconfig.py Python-3.8.0/Lib/sysconfig.py --- Python-3.8.0-orig/Lib/sysconfig.py 2019-10-22 10:01:57.159242500 +0300 +++ Python-3.8.0/Lib/sysconfig.py 2019-10-22 10:02:07.580060800 +0300 @@ -97,6 +97,9 @@ _CONFIG_VARS = None _USER_BASE = None +# GCC[mingw*] use posix build system +_POSIX_BUILD = os.name == 'posix' or \ + True def _safe_realpath(path): try: @@ -180,7 +183,7 @@ def _get_default_scheme(): - if os.name == 'posix': + if _POSIX_BUILD: # the default scheme for posix is posix_prefix return 'posix_prefix' return os.name @@ -196,7 +199,7 @@ def joinuser(*args): return os.path.expanduser(os.path.join(*args)) - if os.name == "nt": + if os.name == "nt" and not _POSIX_BUILD: base = os.environ.get("APPDATA") or "~" return joinuser(base, "Python") @@ -493,7 +496,7 @@ def get_config_h_filename(): """Return the path of pyconfig.h.""" if _PYTHON_BUILD: - if os.name == "nt": + if os.name == "nt" and not _POSIX_BUILD: inc_dir = os.path.join(_sys_home or _PROJECT_BASE, "PC") else: inc_dir = _sys_home or _PROJECT_BASE @@ -564,9 +567,9 @@ # sys.abiflags may not be defined on all platforms. _CONFIG_VARS['abiflags'] = '' - if os.name == 'nt': + if os.name == 'nt' and not _POSIX_BUILD: _init_non_posix(_CONFIG_VARS) - if os.name == 'posix': + if _POSIX_BUILD: _init_posix(_CONFIG_VARS) # For backward compatibility, see issue19555 SO = _CONFIG_VARS.get('EXT_SUFFIX') @@ -579,7 +582,7 @@ # Always convert srcdir to an absolute path srcdir = _CONFIG_VARS.get('srcdir', _PROJECT_BASE) - if os.name == 'posix': + if _POSIX_BUILD: if _PYTHON_BUILD: # If srcdir is a relative path (typically '.' or '..') # then it should be interpreted relative to the directory