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
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
changed the title
PEP 632: clarify migration advise
PEP 632: clarify migration advice
Jun 2, 2021
tiran commentedJun 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
with
in majority of cases?
Also the link from reference
[5]
is broken. https://setuptools.readthedocs.io/en/latest/distutils-legacy.html is a 404.The text was updated successfully, but these errors were encountered: