Skip to content

[WIP] gh-92584: Rename the distutils package to _distutils #92585

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

Closed
wants to merge 17 commits into from
Closed

[WIP] gh-92584: Rename the distutils package to _distutils #92585

wants to merge 17 commits into from

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented May 9, 2022

No description provided.

@vstinner vstinner marked this pull request as draft May 9, 2022 22:44
@vstinner vstinner changed the title gh-92584: Rename the distutils package to _distutils [WIP] gh-92584: Rename the distutils package to _distutils May 9, 2022
@vstinner
Copy link
Member Author

vstinner commented May 9, 2022

test_tools and test_venv fail because of pip: pypa/pip#11103

@vstinner
Copy link
Member Author

vstinner commented May 9, 2022

By default, make install fails on ensurepip, also because of pip.

Temporary workaround: ./configure --with-ensurepip=no: make install doesn't run ensurepip and so doesn't fail.

@vstinner
Copy link
Member Author

vstinner commented May 9, 2022

For now, this PR is a draft, and so I didn't write any documentation (no NEWS entry, no What's New in Python 3.12, etc.).

@vstinner
Copy link
Member Author

vstinner commented May 9, 2022

Docs / Docs (pull_request) Failing

make -C Doc/ PYTHON=../python venv fails because of pip.

@vstinner
Copy link
Member Author

Related issue: #92584

Copy link
Member

@FFY00 FFY00 left a comment

Choose a reason for hiding this comment

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

This is correct, and seems like the best approach. We just have to fix pip.

@FFY00 FFY00 requested a review from jaraco May 10, 2022 00:41
@tiran
Copy link
Member

tiran commented May 10, 2022

@erlend-aasland and I will have the last modules ported to Modules/Setup.stdlib very soon. We won't need distutils any more then. I recommend that we do not rename distutils and instead remove it once and for all.

@vstinner
Copy link
Member Author

@tiran:

@erlend-aasland and I will have the last modules ported to Modules/Setup.stdlib very soon. We won't need distutils any more then. I recommend that we do not rename distutils and instead remove it once and for all.

See the issue #92584: peg_generator, c-analyzer tool and test_cppext still use distutils. I would prefer to not break them.

@vstinner
Copy link
Member Author

See the issue #92584: peg_generator, c-analyzer tool and test_cppext still use distutils. I would prefer to not break them.

I modified test_cppext to build the C++ extension with setuptools. So far, so good: it works on all buildbots.

We can try a similar approach for test_peg_generator. Right now, test_peg_generator builds a library to make the test faster. I don't know how to port distutils code to setuptools.

@vstinner
Copy link
Member Author

@tiran:

@erlend-aasland and I will have the last modules ported to Modules/Setup.stdlib very soon.

How is it going? Is this work tracked somewhere?

For example, configure.ac mentions the array module, but setup.py still has code to build this extension. Is there a plan to remove the setup.py code, if the configure/Makefile code is enough? Or is there still a reason to keep the setup.py code?

@tiran
Copy link
Member

tiran commented Jun 17, 2022

I have created GH-93939

tl;dr every module that uses addext() can be built without distutils (except for a quirk in multiprocessing). Modules that use add() are not yet ported. I have an open PR for _ctypes.

@vstinner vstinner closed this Jun 17, 2022
@vstinner vstinner deleted the remove_distutils branch June 17, 2022 14:51
@vstinner
Copy link
Member Author

It seems like most core devs don't want to keep distutils hidden in the stdlib, but want to directly remove it. So I close my PR. Remaining steps are tracked by other issues.

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