Skip to content

Commit a2e8ef9

Browse files
authored
[Docs] Improve documentation about migration from distutils (#3171)
2 parents ba25a5f + 19609c0 commit a2e8ef9

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@
200200

201201
intersphinx_mapping['pip'] = 'https://pip.pypa.io/en/latest', None
202202
intersphinx_mapping['PyPUG'] = ('https://packaging.python.org/en/latest/', None)
203+
intersphinx_mapping['packaging'] = ('https://packaging.pypa.io/en/latest/', None)
203204
intersphinx_mapping['importlib-resources'] = (
204205
'https://importlib-resources.readthedocs.io/en/latest', None
205206
)

docs/deprecated/distutils-legacy.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ Porting from Distutils
33

44
Setuptools and the PyPA have a `stated goal <https://github.com/pypa/packaging-problems/issues/127>`_ to make Setuptools the reference API for distutils.
55

6-
Since the 49.1.2 release, Setuptools includes a local, vendored copy of distutils (from late copies of CPython) that is disabled by default. To enable the use of this copy of distutils when invoking setuptools, set the enviroment variable:
6+
Since the 60.0.0 release, Setuptools includes a local, vendored copy of distutils (from late copies of CPython) that is enabled by default. To disable the use of this copy of distutils when invoking setuptools, set the enviroment variable:
77

8-
SETUPTOOLS_USE_DISTUTILS=local
8+
SETUPTOOLS_USE_DISTUTILS=stdlib
99

10-
This behavior is planned to become the default.
1110

1211
Prefer Setuptools
1312
-----------------
@@ -20,12 +19,15 @@ As Distutils is deprecated, any usage of functions or objects from distutils is
2019

2120
``distutils.command.{build_clib,build_ext,build_py,sdist}`` → ``setuptools.command.*``
2221

23-
``distutils.log`` → (no replacement yet)
22+
``distutils.log`` → :mod:`logging` (standard library)
2423

25-
``distutils.version.*`` → ``packaging.version.*``
24+
``distutils.version.*`` → :doc:`packaging.version.* <packaging:version>`
2625

2726
``distutils.errors.*`` → ``setuptools.errors.*`` [#errors]_
2827

28+
29+
Migration advice is also provided by :pep:`PEP 632 <632#migration-advice>`.
30+
2931
If a project relies on uses of ``distutils`` that do not have a suitable replacement above, please search the `Setuptools issue tracker <https://github.com/pypa/setuptools/issues/>`_ and file a request, describing the use-case so that Setuptools' maintainers can investigate. Please provide enough detail to help the maintainers understand how distutils is used, what value it provides, and why that behavior should be supported.
3032

3133

0 commit comments

Comments
 (0)