Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-81057: Vendor a Subset of distutils for the c-analyzer Tool #102505

Merged

Conversation

ericsnowcurrently
Copy link
Member

@ericsnowcurrently ericsnowcurrently commented Mar 7, 2023

distutils was removed in November. However, the c-analyzer relies on it. To solve that here, we vendor the parts the tool needs so it can be run against 3.12+. (Also see gh-92584.)

@ericsnowcurrently
Copy link
Member Author

Note that none of the Windows-related support actually implements the preprocessor code the c-analyzer needs. Here's what that might look like, though: elijahr/python-autopxd2#40.

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, distutils is also used in peg_generator:

import distutils.log
from distutils.core import Distribution, Extension
from distutils.tests.support import fixup_build_ext # type: ignore
from distutils.ccompiler import new_compiler
from distutils.dep_util import newer_group
from distutils.sysconfig import customize_compiler

Will it be convinient to use the single vendored version for both of them?

@ericsnowcurrently
Copy link
Member Author

Thanks for pointing this out. I'll take a look.

@AlexWaygood
Copy link
Member

See these two previous issues that were opened on this topic:

@ericsnowcurrently
Copy link
Member Author

(See #92584 (comment).)

I'm fine with sharing a solution with peg_generator (e.g. a common vendored distutils). In the meantime, I'd like to land this PR. We can remove this vendored distutils when there's a shared solution.

@ericsnowcurrently ericsnowcurrently merged commit ca066bd into python:main Mar 9, 2023
@ericsnowcurrently ericsnowcurrently deleted the c-analyzer-vendor-distutils branch March 9, 2023 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants