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

PEP 632: clarify migration advice #1975

Open
tiran opened this issue Jun 2, 2021 · 1 comment
Open

PEP 632: clarify migration advice #1975

tiran opened this issue Jun 2, 2021 · 1 comment
Assignees

Comments

@tiran
Copy link
Member

tiran commented Jun 2, 2021

Steve,

I have been contacted by a co-worker who got confused by PEP 632's migration advise. It's not obvious to non-experts how distutils commands and core-features can be substituted with setuptools. Could you please include an example that users can replace distutils imports like

from distutils import setup
from distutils.command.build_ext import build_ext

with

from setuptools import setup
from setuptools.command.build_ext import build_ext

in majority of cases?

Also the link from reference [5] is broken. https://setuptools.readthedocs.io/en/latest/distutils-legacy.html is a 404.

@tiran
Copy link
Member Author

tiran commented Jun 2, 2021

The section with stdlib replacement is also a bit hard to parse. There is no clear visual separation between short dash, serif and sans-serif fonts. How about using an em dash and a bit more text?

* ``distutils.fancy_getopt`` — use the ``argparse`` module
* ``distutils.spawn.find_executable`` — use the ``shutil.which`` function
* ``distutils.spawn.spawn`` — use the ``subprocess.run`` function
* ``distutils.sysconfig`` — use the ``sysconfig`` module
* ``distutils.util.get_platform`` — use the ``platform`` module

@brettcannon brettcannon changed the title PEP 632: clarify migration advise PEP 632: clarify migration advice Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants