Skip to content

Commit dae1229

Browse files
authored
bpo-36797: Prune more legacy distutils documentation (GH-13092)
Removes more legacy distutils documentation, and more clearly marks what is left as potentially outdated, with references to setuptools as a replacement.
1 parent 0a52d73 commit dae1229

File tree

14 files changed

+60
-70
lines changed

14 files changed

+60
-70
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.. note::
2+
3+
This document is being retained solely until the ``setuptools`` documentation
4+
at https://setuptools.readthedocs.io/en/latest/setuptools.html
5+
independently covers all of the relevant information currently included here.

Doc/distutils/apiref.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@
44
API Reference
55
*************
66

7+
.. seealso::
8+
9+
`New and changed setup.py arguments in setuptools <setuptools-setup-py>`_
10+
The ``setuptools`` project adds new capabilities to the ``setup`` function
11+
and other APIs, makes the API consistent across different Python versions,
12+
and is hence recommended over using ``distutils`` directly.
13+
14+
.. _setuptools-setup-py: https://setuptools.readthedocs.io/en/latest/setuptools.html#new-and-changed-setup-keywords
15+
16+
.. include:: ./_setuptools_disclaimer.rst
717

818
:mod:`distutils.core` --- Core Distutils functionality
919
======================================================

Doc/distutils/builtdist.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
Creating Built Distributions
55
****************************
66

7+
.. include:: ./_setuptools_disclaimer.rst
8+
79
A "built distribution" is what you're probably used to thinking of either as a
810
"binary package" or an "installer" (depending on your background). It's not
911
necessarily binary, though, because it might contain only Python source code

Doc/distutils/commandref.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
Command Reference
55
*****************
66

7+
.. include:: ./_setuptools_disclaimer.rst
8+
79
.. % \section{Building modules: the \protect\command{build} command family}
810
.. % \label{build-cmds}
911
.. % \subsubsection{\protect\command{build}}

Doc/distutils/configfile.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
Writing the Setup Configuration File
55
************************************
66

7+
.. include:: ./_setuptools_disclaimer.rst
8+
79
Often, it's not possible to write down everything needed to build a distribution
810
*a priori*: you may need to get some information from the user, or from the
911
user's system, in order to proceed. As long as that information is fairly

Doc/distutils/examples.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
Examples
55
********
66

7+
.. include:: ./_setuptools_disclaimer.rst
8+
79
This chapter provides a number of basic examples to help get started with
810
distutils. Additional information about using distutils can be found in the
911
Distutils Cookbook.

Doc/distutils/extending.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
Extending Distutils
55
*******************
66

7+
.. include:: ./_setuptools_disclaimer.rst
8+
79
Distutils can be extended in various ways. Most extensions take the form of new
810
commands or replacements for existing commands. New commands may be written to
911
support new types of platform-specific packaging, for example, while

Doc/distutils/index.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@
1212
:ref:`distributing-index`
1313
The up to date module distribution documentations
1414

15-
This document describes the Python Distribution Utilities ("Distutils") from
16-
the module developer's point of view, describing how to use the Distutils to
17-
make Python modules and extensions easily available to a wider audience with
18-
very little overhead for build/release/install mechanics.
15+
.. include:: ./_setuptools_disclaimer.rst
1916

2017
.. note::
2118

@@ -25,6 +22,11 @@ very little overhead for build/release/install mechanics.
2522
recommendations section <https://packaging.python.org/guides/tool-recommendations/>`__
2623
in the Python Packaging User Guide for more information.
2724

25+
This document describes the Python Distribution Utilities ("Distutils") from
26+
the module developer's point of view, describing the underlying capabilities
27+
that ``setuptools`` builds on to allow Python developers to make Python modules
28+
and extensions readily available to a wider audience.
29+
2830
.. toctree::
2931
:maxdepth: 2
3032
:numbered:

Doc/distutils/introduction.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
An Introduction to Distutils
55
****************************
66

7+
.. include:: ./_setuptools_disclaimer.rst
8+
79
This document covers using the Distutils to distribute your Python modules,
810
concentrating on the role of developer/distributor: if you're looking for
911
information on installing Python modules, you should refer to the

Doc/distutils/setupscript.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
Writing the Setup Script
55
************************
66

7+
.. include:: ./_setuptools_disclaimer.rst
8+
79
The setup script is the centre of all activity in building, distributing, and
810
installing modules using the Distutils. The main purpose of the setup script is
911
to describe your module distribution to the Distutils, so that the various

0 commit comments

Comments
 (0)