Repository navigation
Conversation
Depend on the extracted compilers.C, compilers.common, and compilers.errors distributions (published from coherent-oss) and delete the vendored distutils/compilers/ tree. The compiler shims (ccompiler/unixccompiler/_msvccompiler/cygwinccompiler/zosccompiler), errors, util, and compat.numpy now import from the top-level compilers packages instead of distutils.compilers. The compiler tests move out with the tree (they're tested in compilers.C now); drop the orphaned suppress_path_mangle fixture and repoint disable_macos_customization at compilers.common.platform.macos. Ref pypa/setuptools#5264, pypa/setuptools#5274. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pin lower bounds to the versions that ship a py.typed marker so mypy (and downstream type checkers) recognize the compilers imports as typed. Ref coherent-oss/coherent.build#72 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Member
Author
|
CI is green except the expected That job drops the current distutils into setuptools' vendored |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adopt the standalone compilers distributions that were extracted from distutils, completing the extraction side of the compilers-decoupling epic (pypa/setuptools#5264, pypa/setuptools#5274).
What
compilers.C,compilers.common, andcompilers.errors(published from coherent-oss).distutils/compilers/tree (its contents now live in, and are CI-tested by, those packages).distutils.compilers.*to the top-level packages:ccompiler,unixccompiler,_msvccompiler,cygwinccompiler,zosccompiler) →compilers.C.*errors→compilers.C.errors+compilers.errorsutil→compilers.common.platformcompat.numpy→compilers.C.baseconftest.pydrops the now-orphanedsuppress_path_manglefixture and repointsdisable_macos_customizationatcompilers.common.platform.macos.The public shims are unchanged in behavior —
distutils.ccompiler.CCompileriscompilers.C.base.Compiler,distutils.errors.CCompilerErroriscompilers.errors.Error,distutils.util.get_platform()routes throughcompilers.common.platform.detect, etc.There's no dependency cycle:
compilers.Cimportsdistutilsonly lazily on deprecated paths (deprecatedCompiler.spawn,debug_print) and deliberately doesn't declare it (coherent-oss/compilers.C#1), so this is a clean one-waydistutils → compilers.Cdependency.Verification
With the three packages installed, the full suite passes (220 passed, 9 skipped) and ruff is clean.
Notes
setuptools/_distutils, so once distutils depends oncompilers.C, setuptools must bundle or depend oncompilers.C/compilers.common/compilers.errorsfor its_distutilsto keep working. That's the pivot into Phase 4 (Retire the distutils hack (remove top-leveldistutilsinjection) setuptools#5273) and will be handled separately.