@@ -329,6 +329,16 @@ be required, but can be omitted with newer versions of setuptools and pip.
329329 There are many more than the ones mentioned here. See
330330 :doc: `/guides/distributing-packages-using-setuptools ` for more details.
331331
332+ .. warning ::
333+
334+ You may see some existing projects or other Python packaging tutorials that
335+ import their ``setup `` function from ``distutils.core `` rather than
336+ ``setuptools ``. This is a legacy approach that installers support
337+ for backwards compatibility purposes [1 ]_, but using the legacy ``distutils `` API
338+ directly in new projects is strongly discouraged, since ``distutils `` is
339+ deprecated as per :pep: `632 ` and will be removed from the standard library
340+ in Python 3.12.
341+
332342Creating README.md
333343------------------
334344
@@ -624,3 +634,14 @@ some things you can do:
624634* Read about :doc: `/guides/packaging-binary-extensions `.
625635* Consider alternatives to :ref: `setuptools ` such as :ref: `flit `, :ref: `hatch `,
626636 and :ref: `poetry `.
637+
638+ ----
639+
640+ .. [1 ] Some legacy Python environments may not have ``setuptools ``
641+ pre-installed, and the operators of those environments may still be
642+ requiring users to install packages by running ``setup.py install ``
643+ commands, rather than providing an installer like ``pip `` that
644+ automatically installs required build dependendencies. These
645+ environments will not be able to use many published packages until the
646+ environment is updated to provide an up to date Python package
647+ installation client (e.g. by running ``python -m ensurepip ``).
0 commit comments