From 0796b35fb89ff06c2ffc13256832c7de45bda77d Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Fri, 9 Jan 2026 12:25:11 +0100 Subject: [PATCH 103/N] sysconfig: patch nt schemes again setuptools doesn't play along --- Lib/sysconfig/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Lib/sysconfig/__init__.py b/Lib/sysconfig/__init__.py index fb40ef6..08892ea 100644 --- a/Lib/sysconfig/__init__.py +++ b/Lib/sysconfig/__init__.py @@ -167,6 +167,13 @@ if _HAS_USER_BASE: }, } +# XXX: setuptools uses os.name to select the scheme and doesn't use +# sysconfig, we have to monkey patch the 'nt' scheme for mingw builds +# until that is fixed +if os.name == 'nt' and sys._is_mingw: + _INSTALL_SCHEMES['nt'] = _INSTALL_SCHEMES['posix_prefix'] + _INSTALL_SCHEMES['nt_user'] = _INSTALL_SCHEMES['posix_user'] + _SCHEME_KEYS = ('stdlib', 'platstdlib', 'purelib', 'platlib', 'include', 'scripts', 'data')