summaryrefslogtreecommitdiffstats
path: root/Doc/distutils
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-04-08 16:18:04 (GMT)
committerGitHub <noreply@github.com>2018-04-08 16:18:04 (GMT)
commit46936d5a71d1683dbd8ddb6d7f39aab50ecfec50 (patch)
tree1f51e69c1fbb9401516478b8866d01f1513644cb /Doc/distutils
parent9265dd72e5ec1cfa5fcdb5be8ebffe1d9994bd4b (diff)
downloadcpython-46936d5a71d1683dbd8ddb6d7f39aab50ecfec50.zip
cpython-46936d5a71d1683dbd8ddb6d7f39aab50ecfec50.tar.gz
cpython-46936d5a71d1683dbd8ddb6d7f39aab50ecfec50.tar.bz2
Improve highlighting of some code blocks. (GH-6401)
Diffstat (limited to 'Doc/distutils')
-rw-r--r--Doc/distutils/configfile.rst22
-rw-r--r--Doc/distutils/packageindex.rst8
2 files changed, 22 insertions, 8 deletions
diff --git a/Doc/distutils/configfile.rst b/Doc/distutils/configfile.rst
index 21f1acd..cd10a7f 100644
--- a/Doc/distutils/configfile.rst
+++ b/Doc/distutils/configfile.rst
@@ -36,7 +36,9 @@ consequences:
* installers can override anything in :file:`setup.cfg` using the command-line
options to :file:`setup.py`
-The basic syntax of the configuration file is simple::
+The basic syntax of the configuration file is simple:
+
+.. code-block:: ini
[command]
option=value
@@ -51,9 +53,11 @@ option values can be split across multiple lines simply by indenting the
continuation lines.
You can find out the list of options supported by a particular command with the
-universal :option:`!--help` option, e.g. ::
+universal :option:`!--help` option, e.g.
+
+.. code-block:: shell-session
- > python setup.py --help build_ext
+ $ python setup.py --help build_ext
[...]
Options for 'build_ext' command:
--build-lib (-b) directory for compiled extension modules
@@ -75,14 +79,18 @@ For example, say you want your extensions to be built "in-place"---that is, you
have an extension :mod:`pkg.ext`, and you want the compiled extension file
(:file:`ext.so` on Unix, say) to be put in the same source directory as your
pure Python modules :mod:`pkg.mod1` and :mod:`pkg.mod2`. You can always use the
-:option:`!--inplace` option on the command-line to ensure this::
+:option:`!--inplace` option on the command-line to ensure this:
+
+.. code-block:: sh
python setup.py build_ext --inplace
But this requires that you always specify the :command:`build_ext` command
explicitly, and remember to provide :option:`!--inplace`. An easier way is to
"set and forget" this option, by encoding it in :file:`setup.cfg`, the
-configuration file for this distribution::
+configuration file for this distribution:
+
+.. code-block:: ini
[build_ext]
inplace=1
@@ -103,7 +111,9 @@ information comes from the setup script, and some is automatically generated by
the Distutils (such as the list of files installed). But some of it has to be
supplied as options to :command:`bdist_rpm`, which would be very tedious to do
on the command-line for every run. Hence, here is a snippet from the Distutils'
-own :file:`setup.cfg`::
+own :file:`setup.cfg`:
+
+.. code-block:: ini
[bdist_rpm]
release = 1
diff --git a/Doc/distutils/packageindex.rst b/Doc/distutils/packageindex.rst
index 44556e3..086e14e 100644
--- a/Doc/distutils/packageindex.rst
+++ b/Doc/distutils/packageindex.rst
@@ -156,7 +156,9 @@ The :command:`register` and :command:`upload` commands both check for the
existence of a :file:`.pypirc` file at the location :file:`$HOME/.pypirc`.
If this file exists, the command uses the username, password, and repository
URL configured in the file. The format of a :file:`.pypirc` file is as
-follows::
+follows:
+
+.. code-block:: ini
[distutils]
index-servers =
@@ -179,7 +181,9 @@ Each section describing a repository defines three variables:
will be prompt to type it when needed.
If you want to define another server a new section can be created and
-listed in the *index-servers* variable::
+listed in the *index-servers* variable:
+
+.. code-block:: ini
[distutils]
index-servers =