aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-07-24 21:32:10 -0400
committerGitHub <noreply@github.com>2020-07-24 21:32:10 -0400
commitba209a15247b9578d565b7491f88dc1142ba29e4 (patch)
tree0e2d01c034091eae25148f76d5a78b84c05fae16 /docs
parent08f4ee0a37fa1a463ce30ee1240955c92921be18 (diff)
parentbec11f03ab81da8af69909697925166793893e07 (diff)
downloadexternal_python_setuptools-ba209a15247b9578d565b7491f88dc1142ba29e4.tar.gz
external_python_setuptools-ba209a15247b9578d565b7491f88dc1142ba29e4.tar.bz2
external_python_setuptools-ba209a15247b9578d565b7491f88dc1142ba29e4.zip
Merge pull request #2266 from pypa/docs/distutils-porting
Add docs on porting from distutils.
Diffstat (limited to 'docs')
-rw-r--r--docs/distutils-legacy.txt25
-rw-r--r--docs/index.txt1
2 files changed, 26 insertions, 0 deletions
diff --git a/docs/distutils-legacy.txt b/docs/distutils-legacy.txt
new file mode 100644
index 00000000..a5d96260
--- /dev/null
+++ b/docs/distutils-legacy.txt
@@ -0,0 +1,25 @@
+Porting from Distutils
+======================
+
+Setuptools and the PyPA have a `stated goal <https://github.com/pypa/packaging-problems/issues/127>`_ to make Setuptools the reference API for distutils.
+
+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:
+
+ SETUPTOOLS_USE_DISTUTILS=local
+
+This behavior is planned to become the default.
+
+Prefer Setuptools
+-----------------
+
+As Distutils is deprecated, any usage of functions or objects from distutils is similarly discouraged, and Setuptools aims to replace or deprecate all such uses. This section describes the recommended replacements.
+
+``distutils.core.setup`` → ``setuptools.setup``
+
+``distutils.cmd.Command`` → ``setuptools.Command``
+
+``distutils.log`` → (no replacement yet)
+
+``distutils.version.*`` → ``packaging.version.*``
+
+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.
diff --git a/docs/index.txt b/docs/index.txt
index fc111a99..5ee17eac 100644
--- a/docs/index.txt
+++ b/docs/index.txt
@@ -15,4 +15,5 @@ Documentation content:
development
roadmap
Deprecated: Easy Install <easy_install>
+ distutils-legacy
history