Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3f40c40

Browse files
committed
Doc: remove invalid uses of ":option:" which will emit warnings in Sphinx 1.3.
1 parent 8a97896 commit 3f40c40

7 files changed

Lines changed: 58 additions & 58 deletions

File tree

Doc/distutils/builtdist.rst

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -186,21 +186,21 @@ Distutils configuration files. Various options and sections in the
186186
+------------------------------------------+----------------------------------------------+
187187
| RPM :file:`.spec` file option or section | Distutils setup script option |
188188
+==========================================+==============================================+
189-
| Name | :option:`name` |
189+
| Name | ``name`` |
190190
+------------------------------------------+----------------------------------------------+
191-
| Summary (in preamble) | :option:`description` |
191+
| Summary (in preamble) | ``description`` |
192192
+------------------------------------------+----------------------------------------------+
193-
| Version | :option:`version` |
193+
| Version | ``version`` |
194194
+------------------------------------------+----------------------------------------------+
195-
| Vendor | :option:`author` and :option:`author_email`, |
196-
| | or --- & :option:`maintainer` and |
197-
| | :option:`maintainer_email` |
195+
| Vendor | ``author`` and ``author_email``, |
196+
| | or --- & ``maintainer`` and |
197+
| | ``maintainer_email`` |
198198
+------------------------------------------+----------------------------------------------+
199-
| Copyright | :option:`license` |
199+
| Copyright | ``license`` |
200200
+------------------------------------------+----------------------------------------------+
201-
| Url | :option:`url` |
201+
| Url | ``url`` |
202202
+------------------------------------------+----------------------------------------------+
203-
| %description (section) | :option:`long_description` |
203+
| %description (section) | ``long_description`` |
204204
+------------------------------------------+----------------------------------------------+
205205

206206
Additionally, there are many options in :file:`.spec` files that don't have
@@ -211,27 +211,27 @@ options to the :command:`bdist_rpm` command as follows:
211211
| RPM :file:`.spec` file option | :command:`bdist_rpm` option | default value |
212212
| or section | | |
213213
+===============================+=============================+=========================+
214-
| Release | :option:`release` | "1" |
214+
| Release | ``release`` | "1" |
215215
+-------------------------------+-----------------------------+-------------------------+
216-
| Group | :option:`group` | "Development/Libraries" |
216+
| Group | ``group`` | "Development/Libraries" |
217217
+-------------------------------+-----------------------------+-------------------------+
218-
| Vendor | :option:`vendor` | (see above) |
218+
| Vendor | ``vendor`` | (see above) |
219219
+-------------------------------+-----------------------------+-------------------------+
220-
| Packager | :option:`packager` | (none) |
220+
| Packager | ``packager`` | (none) |
221221
+-------------------------------+-----------------------------+-------------------------+
222-
| Provides | :option:`provides` | (none) |
222+
| Provides | ``provides`` | (none) |
223223
+-------------------------------+-----------------------------+-------------------------+
224-
| Requires | :option:`requires` | (none) |
224+
| Requires | ``requires`` | (none) |
225225
+-------------------------------+-----------------------------+-------------------------+
226-
| Conflicts | :option:`conflicts` | (none) |
226+
| Conflicts | ``conflicts`` | (none) |
227227
+-------------------------------+-----------------------------+-------------------------+
228-
| Obsoletes | :option:`obsoletes` | (none) |
228+
| Obsoletes | ``obsoletes`` | (none) |
229229
+-------------------------------+-----------------------------+-------------------------+
230-
| Distribution | :option:`distribution_name` | (none) |
230+
| Distribution | ``distribution_name`` | (none) |
231231
+-------------------------------+-----------------------------+-------------------------+
232-
| BuildRequires | :option:`build_requires` | (none) |
232+
| BuildRequires | ``build_requires`` | (none) |
233233
+-------------------------------+-----------------------------+-------------------------+
234-
| Icon | :option:`icon` | (none) |
234+
| Icon | ``icon`` | (none) |
235235
+-------------------------------+-----------------------------+-------------------------+
236236

237237
Obviously, supplying even a few of these options on the command-line would be

Doc/distutils/configfile.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ universal :option:`--help` option, e.g. ::
6767
[...]
6868

6969
Note that an option spelled :option:`--foo-bar` on the command-line is spelled
70-
:option:`foo_bar` in configuration files.
70+
``foo_bar`` in configuration files.
7171

7272
.. _distutils-build-ext-inplace:
7373

@@ -114,7 +114,7 @@ own :file:`setup.cfg`::
114114
doc/
115115
examples/
116116

117-
Note that the :option:`doc_files` option is simply a whitespace-separated string
117+
Note that the ``doc_files`` option is simply a whitespace-separated string
118118
split across multiple lines for readability.
119119

120120

Doc/distutils/examples.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Pure Python distribution (by module)
2222

2323
If you're just distributing a couple of modules, especially if they don't live
2424
in a particular package, you can specify them individually using the
25-
:option:`py_modules` option in the setup script.
25+
``py_modules`` option in the setup script.
2626

2727
In the simplest case, you'll have two files to worry about: a setup script and
2828
the single module you're distributing, :file:`foo.py` in this example::
@@ -41,12 +41,12 @@ directory.) A minimal setup script to describe this situation would be::
4141
)
4242

4343
Note that the name of the distribution is specified independently with the
44-
:option:`name` option, and there's no rule that says it has to be the same as
44+
``name`` option, and there's no rule that says it has to be the same as
4545
the name of the sole module in the distribution (although that's probably a good
4646
convention to follow). However, the distribution name is used to generate
4747
filenames, so you should stick to letters, digits, underscores, and hyphens.
4848

49-
Since :option:`py_modules` is a list, you can of course specify multiple
49+
Since ``py_modules`` is a list, you can of course specify multiple
5050
modules, eg. if you're distributing modules :mod:`foo` and :mod:`bar`, your
5151
setup might look like this::
5252

@@ -130,7 +130,7 @@ requires the least work to describe in your setup script::
130130
)
131131

132132
If you want to put modules in directories not named for their package, then you
133-
need to use the :option:`package_dir` option again. For example, if the
133+
need to use the ``package_dir`` option again. For example, if the
134134
:file:`src` directory holds modules in the :mod:`foobar` package::
135135

136136
<root>/
@@ -169,8 +169,8 @@ in which case your setup script would be ::
169169

170170
(The empty string also stands for the current directory.)
171171

172-
If you have sub-packages, they must be explicitly listed in :option:`packages`,
173-
but any entries in :option:`package_dir` automatically extend to sub-packages.
172+
If you have sub-packages, they must be explicitly listed in ``packages``,
173+
but any entries in ``package_dir`` automatically extend to sub-packages.
174174
(In other words, the Distutils does *not* scan your source tree, trying to
175175
figure out which directories correspond to Python packages by looking for
176176
:file:`__init__.py` files.) Thus, if the default layout grows a sub-package::
@@ -199,8 +199,8 @@ then the corresponding setup script would be ::
199199
Single extension module
200200
=======================
201201

202-
Extension modules are specified using the :option:`ext_modules` option.
203-
:option:`package_dir` has no effect on where extension source files are found;
202+
Extension modules are specified using the ``ext_modules`` option.
203+
``package_dir`` has no effect on where extension source files are found;
204204
it only affects the source for pure Python modules. The simplest case, a
205205
single extension module in a single C source file, is::
206206

Doc/distutils/extending.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ commands to be added which can support existing :file:`setup.py` scripts without
6161
requiring modifications to the Python installation. This is expected to allow
6262
third-party extensions to provide support for additional packaging systems, but
6363
the commands can be used for anything distutils commands can be used for. A new
64-
configuration option, :option:`command_packages` (command-line option
64+
configuration option, ``command_packages`` (command-line option
6565
:option:`--command-packages`), can be used to specify additional packages to be
6666
searched for modules implementing commands. Like all distutils options, this
6767
can be specified on the command line or in a configuration file. This option
@@ -75,7 +75,7 @@ This new option can be used to add any number of packages to the list of
7575
packages searched for command implementations; multiple package names should be
7676
separated by commas. When not specified, the search is only performed in the
7777
:mod:`distutils.command` package. When :file:`setup.py` is run with the option
78-
:option:`--command-packages` :option:`distcmds,buildcmds`, however, the packages
78+
``--command-packages distcmds,buildcmds``, however, the packages
7979
:mod:`distutils.command`, :mod:`distcmds`, and :mod:`buildcmds` will be searched
8080
in that order. New commands are expected to be implemented in modules of the
8181
same name as the command by classes sharing the same name. Given the example

Doc/distutils/setupscript.rst

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ code instead of hardcoding path separators::
6262
Listing whole packages
6363
======================
6464

65-
The :option:`packages` option tells the Distutils to process (build, distribute,
65+
The ``packages`` option tells the Distutils to process (build, distribute,
6666
install, etc.) all pure Python modules found in each package mentioned in the
67-
:option:`packages` list. In order to do this, of course, there has to be a
67+
``packages`` list. In order to do this, of course, there has to be a
6868
correspondence between package names and directories in the filesystem. The
6969
default correspondence is the most obvious one, i.e. package :mod:`distutils` is
7070
found in the directory :file:`distutils` relative to the distribution root.
@@ -75,7 +75,7 @@ the directory where your setup script lives. If you break this promise, the
7575
Distutils will issue a warning but still process the broken package anyway.
7676

7777
If you use a different convention to lay out your source directory, that's no
78-
problem: you just have to supply the :option:`package_dir` option to tell the
78+
problem: you just have to supply the ``package_dir`` option to tell the
7979
Distutils about your convention. For example, say you keep all Python source
8080
under :file:`lib`, so that modules in the "root package" (i.e., not in any
8181
package at all) are in :file:`lib`, modules in the :mod:`foo` package are in
@@ -94,13 +94,13 @@ written in the setup script as ::
9494

9595
package_dir = {'foo': 'lib'}
9696

97-
A ``package: dir`` entry in the :option:`package_dir` dictionary implicitly
97+
A ``package: dir`` entry in the ``package_dir`` dictionary implicitly
9898
applies to all packages below *package*, so the :mod:`foo.bar` case is
9999
automatically handled here. In this example, having ``packages = ['foo',
100100
'foo.bar']`` tells the Distutils to look for :file:`lib/__init__.py` and
101-
:file:`lib/bar/__init__.py`. (Keep in mind that although :option:`package_dir`
101+
:file:`lib/bar/__init__.py`. (Keep in mind that although ``package_dir``
102102
applies recursively, you must explicitly list all packages in
103-
:option:`packages`: the Distutils will *not* recursively scan your source tree
103+
``packages``: the Distutils will *not* recursively scan your source tree
104104
looking for any directory with an :file:`__init__.py` file.)
105105

106106

@@ -120,7 +120,7 @@ This describes two modules, one of them in the "root" package, the other in the
120120
:mod:`pkg` package. Again, the default package/directory layout implies that
121121
these two modules can be found in :file:`mod1.py` and :file:`pkg/mod2.py`, and
122122
that :file:`pkg/__init__.py` exists as well. And again, you can override the
123-
package/directory correspondence using the :option:`package_dir` option.
123+
package/directory correspondence using the ``package_dir`` option.
124124

125125

126126
.. _describing-extensions:
@@ -138,7 +138,7 @@ directories, libraries to link with, etc.).
138138
.. XXX read over this section
139139
140140
All of this is done through another keyword argument to :func:`setup`, the
141-
:option:`ext_modules` option. :option:`ext_modules` is just a list of
141+
``ext_modules`` option. ``ext_modules`` is just a list of
142142
:class:`~distutils.core.Extension` instances, each of which describes a
143143
single extension module.
144144
Suppose your distribution includes a single extension, called :mod:`foo` and
@@ -181,7 +181,7 @@ in the filesystem (and therefore where in Python's namespace hierarchy) the
181181
resulting extension lives.
182182

183183
If you have a number of extensions all in the same package (or all under the
184-
same base package), use the :option:`ext_package` keyword argument to
184+
same base package), use the ``ext_package`` keyword argument to
185185
:func:`setup`. For example, ::
186186

187187
setup(...,
@@ -336,24 +336,24 @@ Other options
336336

337337
There are still some other options which can be used to handle special cases.
338338

339-
The :option:`optional` option is a boolean; if it is true,
339+
The ``optional`` option is a boolean; if it is true,
340340
a build failure in the extension will not abort the build process, but
341341
instead simply not install the failing extension.
342342

343-
The :option:`extra_objects` option is a list of object files to be passed to the
343+
The ``extra_objects`` option is a list of object files to be passed to the
344344
linker. These files must not have extensions, as the default extension for the
345345
compiler is used.
346346

347-
:option:`extra_compile_args` and :option:`extra_link_args` can be used to
347+
``extra_compile_args`` and ``extra_link_args`` can be used to
348348
specify additional command line options for the respective compiler and linker
349349
command lines.
350350

351-
:option:`export_symbols` is only useful on Windows. It can contain a list of
351+
``export_symbols`` is only useful on Windows. It can contain a list of
352352
symbols (functions or variables) to be exported. This option is not needed when
353353
building compiled extensions: Distutils will automatically add ``initmodule``
354354
to the list of exported symbols.
355355

356-
The :option:`depends` option is a list of files that the extension depends on
356+
The ``depends`` option is a list of files that the extension depends on
357357
(for example header files). The build command will call the compiler on the
358358
sources to rebuild extension if any on this files has been modified since the
359359
previous build.
@@ -449,7 +449,7 @@ to refer to the current interpreter location. By default, it is replaced with
449449
the current interpreter location. The :option:`--executable` (or :option:`-e`)
450450
option will allow the interpreter path to be explicitly overridden.
451451

452-
The :option:`scripts` option simply is a list of files to be handled in this
452+
The ``scripts`` option simply is a list of files to be handled in this
453453
way. From the PyXML setup script::
454454

455455
setup(...,
@@ -514,11 +514,11 @@ The corresponding call to :func:`setup` might be::
514514
Installing Additional Files
515515
===========================
516516

517-
The :option:`data_files` option can be used to specify additional files needed
517+
The ``data_files`` option can be used to specify additional files needed
518518
by the module distribution: configuration files, message catalogs, data files,
519519
anything which doesn't fit in the previous categories.
520520

521-
:option:`data_files` specifies a sequence of (*directory*, *files*) pairs in the
521+
``data_files`` specifies a sequence of (*directory*, *files*) pairs in the
522522
following way::
523523

524524
setup(...,
@@ -539,7 +539,7 @@ modules). Each file name in *files* is interpreted relative to the
539539
directory information from *files* is used to determine the final location of
540540
the installed file; only the name of the file is used.
541541

542-
You can specify the :option:`data_files` options as a simple sequence of files
542+
You can specify the ``data_files`` options as a simple sequence of files
543543
without specifying a target directory, but this is not recommended, and the
544544
:command:`install` command will print a warning in this case. To install data
545545
files directly in the target directory, an empty string should be given as the
@@ -650,7 +650,7 @@ information is sometimes used to indicate sub-releases. These are
650650
1.0.1a2
651651
the second alpha release of the first patch version of 1.0
652652

653-
:option:`classifiers` are specified in a Python list::
653+
``classifiers`` are specified in a Python list::
654654

655655
setup(...,
656656
classifiers=[

Doc/distutils/sourcedist.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,16 @@ If you don't supply an explicit list of files (or instructions on how to
7272
generate one), the :command:`sdist` command puts a minimal default set into the
7373
source distribution:
7474

75-
* all Python source files implied by the :option:`py_modules` and
76-
:option:`packages` options
75+
* all Python source files implied by the ``py_modules`` and
76+
``packages`` options
7777

78-
* all C source files mentioned in the :option:`ext_modules` or
79-
:option:`libraries` options
78+
* all C source files mentioned in the ``ext_modules`` or
79+
``libraries`` options
8080

8181
.. XXX getting C library sources currently broken---no
8282
:meth:`get_source_files` method in :file:`build_clib.py`!
8383
84-
* scripts identified by the :option:`scripts` option
84+
* scripts identified by the ``scripts`` option
8585
See :ref:`distutils-installing-scripts`.
8686

8787
* anything that looks like a test script: :file:`test/test\*.py` (currently, the
@@ -167,7 +167,7 @@ source distribution:
167167

168168
#. include all Python source files in the :file:`distutils` and
169169
:file:`distutils/command` subdirectories (because packages corresponding to
170-
those two directories were mentioned in the :option:`packages` option in the
170+
those two directories were mentioned in the ``packages`` option in the
171171
setup script---see section :ref:`setup-script`)
172172

173173
#. include :file:`README.txt`, :file:`setup.py`, and :file:`setup.cfg` (standard

Doc/whatsnew/2.1.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ will include metadata, making it possible to build automated cataloguing systems
555555
and experiment with them. With the result experience, perhaps it'll be possible
556556
to design a really good catalog and then build support for it into Python 2.2.
557557
For example, the Distutils :command:`sdist` and :command:`bdist_\*` commands
558-
could support a :option:`upload` option that would automatically upload your
558+
could support a ``upload`` option that would automatically upload your
559559
package to a catalog server.
560560

561561
You can start creating packages containing :file:`PKG-INFO` even if you're not

0 commit comments

Comments
 (0)