Skip to content

Move compilers.C to stdlib sysconfig + injection shim (investigation) #5269

Description

@jaraco

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions