Part of the compilers decoupling epic #5264 (Phase 1). Investigation issue — spawns its own PR(s).
The deepest coupling and the one most likely to change build behavior. The standalone compilers.C should default to stdlib sysconfig.
Surface used by compilers.C:
get_config_var keys: CC, CXX, CFLAGS, GNULD, LDVERSION, LIBDIR, abs_builddir, installed_base, platlibdir — all present in stdlib sysconfig.
sysconfig.python_build → stdlib sysconfig.is_python_build()
get_config_h_filename() → stdlib equivalent exists
customize_compiler() — the crux. distutils-specific logic that injects the interpreter's CC/CFLAGS/LDSHARED/AR/etc. into a Unix Compiler.
Scope: decide whether the standalone lib carries its own customize_compiler over stdlib config vars, and provide a (possibly deprecated) injection hook so distutils/setuptools can supply specialized behavior for back-compat. Behavior change is acceptable for the standalone default.
Part of the compilers decoupling epic #5264 (Phase 1). Investigation issue — spawns its own PR(s).
The deepest coupling and the one most likely to change build behavior. The standalone
compilers.Cshould default to stdlibsysconfig.Surface used by
compilers.C:get_config_varkeys:CC,CXX,CFLAGS,GNULD,LDVERSION,LIBDIR,abs_builddir,installed_base,platlibdir— all present in stdlibsysconfig.sysconfig.python_build→ stdlibsysconfig.is_python_build()get_config_h_filename()→ stdlib equivalent existscustomize_compiler()— the crux. distutils-specific logic that injects the interpreter'sCC/CFLAGS/LDSHARED/AR/etc. into a UnixCompiler.Scope: decide whether the standalone lib carries its own
customize_compilerover stdlib config vars, and provide a (possibly deprecated) injection hook so distutils/setuptools can supply specialized behavior for back-compat. Behavior change is acceptable for the standalone default.