Skip to content

Commit 7880db6

Browse files
#19196: Improved cross-references in distutils documentation.
1 parent 0d196ed commit 7880db6

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

Doc/distutils/apiref.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -994,8 +994,9 @@ directories.
994994
simply the list of all files under *src*, with the names changed to be under
995995
*dst*.
996996

997-
*preserve_mode* and *preserve_times* are the same as for :func:`copy_file` in
998-
:mod:`distutils.file_util`; note that they only apply to regular files, not to
997+
*preserve_mode* and *preserve_times* are the same as for
998+
:func:`distutils.file_util.copy_file`; note that they only apply to
999+
regular files, not to
9991000
directories. If *preserve_symlinks* is true, symlinks will be copied as
10001001
symlinks (on platforms that support them!); otherwise (the default), the
10011002
destination of the symlink will be copied. *update* and *verbose* are the same
@@ -1175,7 +1176,7 @@ other utility module.
11751176
Generate a useful error message from an :exc:`OSError` exception object.
11761177
Handles Python 1.5.1 and later styles, and does what it can to deal with
11771178
exception objects that don't have a filename (which happens when the error
1178-
is due to a two-file operation, such as :func:`rename` or :func:`link`).
1179+
is due to a two-file operation, such as :func:`~os.rename` or :func:`~os.link`).
11791180
Returns the error message as a string prefixed with *prefix*.
11801181

11811182

@@ -1265,8 +1266,8 @@ other utility module.
12651266
built/installed/distributed
12661267

12671268

1268-
This module provides the :class:`Distribution` class, which represents the
1269-
module distribution being built/installed/distributed.
1269+
This module provides the :class:`~distutils.core.Distribution` class, which
1270+
represents the module distribution being built/installed/distributed.
12701271

12711272

12721273
:mod:`distutils.extension` --- The Extension class
@@ -1712,8 +1713,8 @@ This module supplies the abstract base class :class:`Command`.
17121713
options, is the :meth:`run` method, which must also be implemented by every
17131714
command class.
17141715

1715-
The class constructor takes a single argument *dist*, a :class:`Distribution`
1716-
instance.
1716+
The class constructor takes a single argument *dist*, a
1717+
:class:`~distutils.core.Distribution` instance.
17171718

17181719

17191720
Creating a new Distutils command

Doc/distutils/setupscript.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ directories, libraries to link with, etc.).
139139
140140
All of this is done through another keyword argument to :func:`setup`, the
141141
:option:`ext_modules` option. :option:`ext_modules` is just a list of
142-
:class:`Extension` instances, each of which describes a single extension module.
142+
:class:`~distutils.core.Extension` instances, each of which describes a
143+
single extension module.
143144
Suppose your distribution includes a single extension, called :mod:`foo` and
144145
implemented by :file:`foo.c`. If no additional instructions to the
145146
compiler/linker are needed, describing this extension is quite simple::
@@ -165,8 +166,8 @@ following sections.
165166
Extension names and packages
166167
----------------------------
167168

168-
The first argument to the :class:`Extension` constructor is always the name of
169-
the extension, including any package names. For example, ::
169+
The first argument to the :class:`~distutils.core.Extension` constructor is
170+
always the name of the extension, including any package names. For example, ::
170171

171172
Extension('foo', ['src/foo1.c', 'src/foo2.c'])
172173

@@ -196,7 +197,8 @@ will compile :file:`foo.c` to the extension :mod:`pkg.foo`, and :file:`bar.c` to
196197
Extension source files
197198
----------------------
198199

199-
The second argument to the :class:`Extension` constructor is a list of source
200+
The second argument to the :class:`~distutils.core.Extension` constructor is
201+
a list of source
200202
files. Since the Distutils currently only support C, C++, and Objective-C
201203
extensions, these are normally C/C++/Objective-C source files. (Be sure to use
202204
appropriate extensions to distinguish C++\ source files: :file:`.cc` and
@@ -232,9 +234,9 @@ linked into the executable.
232234
Preprocessor options
233235
--------------------
234236

235-
Three optional arguments to :class:`Extension` will help if you need to specify
236-
include directories to search or preprocessor macros to define/undefine:
237-
``include_dirs``, ``define_macros``, and ``undef_macros``.
237+
Three optional arguments to :class:`~distutils.core.Extension` will help if
238+
you need to specify include directories to search or preprocessor macros to
239+
define/undefine: ``include_dirs``, ``define_macros``, and ``undef_macros``.
238240

239241
For example, if your extension requires header files in the :file:`include`
240242
directory under your distribution root, use the ``include_dirs`` option::

0 commit comments

Comments
 (0)