diff --git a/source/contribute.rst b/source/contribute.rst
index 3709d341f..5811a1d1c 100644
--- a/source/contribute.rst
+++ b/source/contribute.rst
@@ -77,7 +77,9 @@ in order to test your changes. In order to build this guide locally, you'll
need:
1. `Nox `_. You can install or upgrade
- nox using ``pip``::
+ nox using ``pip``:
+
+ .. code-block:: bash
python -m pip install --user nox
@@ -88,9 +90,11 @@ need:
.. _Hitchhiker's Guide to Python installation instructions:
http://docs.python-guide.org/en/latest/starting/installation/
-To build the guide, run the following bash command in the source folder::
+To build the guide, run the following bash command in the source folder:
+
+.. code-block:: bash
- nox -s build
+ nox -s build
After the process has completed you can find the HTML output in the
``./build/html`` directory. You can open the ``index.html`` file to view the
@@ -98,9 +102,11 @@ guide in web browser, but it's recommended to serve the guide using an HTTP
server.
You can build the guide and serve it via an HTTP server using the following
-command::
+command:
+
+.. code-block:: bash
- nox -s preview
+ nox -s preview
The guide will be browsable via http://localhost:8000.
diff --git a/source/guides/distributing-packages-using-setuptools.rst b/source/guides/distributing-packages-using-setuptools.rst
index c6e7ebf41..7121bd6e3 100644
--- a/source/guides/distributing-packages-using-setuptools.rst
+++ b/source/guides/distributing-packages-using-setuptools.rst
@@ -666,9 +666,9 @@ both installed and editable in project form.
Assuming you're in the root of your project directory, then run:
-::
+.. code-block:: bash
- python -m pip install -e .
+ python -m pip install -e .
Although somewhat cryptic, ``-e`` is short for ``--editable``, and ``.`` refers
@@ -698,7 +698,9 @@ Otherwise, the dependency will be fulfilled from PyPI, due to the installation o
` section in the pip docs. For more on VCS installs,
see the :ref:`VCS Support ` section of the pip docs.
-Lastly, if you don't want to install any dependencies at all, you can run::
+Lastly, if you don't want to install any dependencies at all, you can run:
+
+.. code-block:: bash
python -m pip install -e . --no-deps
@@ -880,9 +882,11 @@ distribution file(s) to upload.
directive). **Before** trying to upload your distribution, you should check
to see if your brief / long descriptions provided in :file:`setup.py` are
valid. You can do this by running :std:doc:`twine check ` on
- your package files::
+ your package files:
+
+ .. code-block:: bash
- twine check dist/*
+ twine check dist/*
Create an account
-----------------
diff --git a/source/guides/dropping-older-python-versions.rst b/source/guides/dropping-older-python-versions.rst
index fea3068c0..080f7282b 100644
--- a/source/guides/dropping-older-python-versions.rst
+++ b/source/guides/dropping-older-python-versions.rst
@@ -105,7 +105,9 @@ Within a Python source package (the zip or the tar-gz file you download) is a te
This file is generated by Distutils or :ref:`setuptools` when it generates the source package.
The file contains a set of keys and values, the list of keys is part of the PyPa standard metadata format.
-You can see the contents of the generated file like this::
+You can see the contents of the generated file like this:
+
+.. code-block:: bash
tar xfO dist/my-package-1.0.0.tar.gz my-package-1.0.0/PKG-INFO
diff --git a/source/guides/index-mirrors-and-caches.rst b/source/guides/index-mirrors-and-caches.rst
index e5cd45e8f..284665eb0 100644
--- a/source/guides/index-mirrors-and-caches.rst
+++ b/source/guides/index-mirrors-and-caches.rst
@@ -35,10 +35,12 @@ cached copies of :term:`packages `:
those downloaded files instead of going to PyPI.
2. A variation on the above which pre-builds the installation files for
the requirements using `python -m pip wheel
- `_::
+ `_:
- python -m pip wheel --wheel-dir=/tmp/wheelhouse SomeProject
- python -m pip install --no-index --find-links=/tmp/wheelhouse SomeProject
+ .. code-block:: bash
+
+ python -m pip wheel --wheel-dir=/tmp/wheelhouse SomeProject
+ python -m pip install --no-index --find-links=/tmp/wheelhouse SomeProject
Caching with devpi
diff --git a/source/guides/making-a-pypi-friendly-readme.rst b/source/guides/making-a-pypi-friendly-readme.rst
index 32e8f2f09..eea221b4a 100644
--- a/source/guides/making-a-pypi-friendly-readme.rst
+++ b/source/guides/making-a-pypi-friendly-readme.rst
@@ -122,9 +122,11 @@ You can check your README for markup errors before uploading as follows:
2. Build the sdist and wheel for your project as described under
:ref:`Packaging Your Project`.
-3. Run ``twine check`` on the sdist and wheel::
+3. Run ``twine check`` on the sdist and wheel:
- twine check dist/*
+ .. code-block:: bash
+
+ twine check dist/*
This command will report any problems rendering your README. If your markup
renders fine, the command will output ``Checking distribution FILENAME:
diff --git a/source/guides/using-manifest-in.rst b/source/guides/using-manifest-in.rst
index 51e779315..c8bfa8802 100644
--- a/source/guides/using-manifest-in.rst
+++ b/source/guides/using-manifest-in.rst
@@ -93,7 +93,9 @@ setuptools will automatically convert the slashes to the local platform's
appropriate directory separator.
Commands are processed in the order they appear in the :file:`MANIFEST.in`
-file. For example, given the commands::
+file. For example, given the commands:
+
+.. code-block:: bash
graft tests
global-exclude *.py[cod]
diff --git a/source/tutorials/installing-packages.rst b/source/tutorials/installing-packages.rst
index 296a17973..f2d522612 100644
--- a/source/tutorials/installing-packages.rst
+++ b/source/tutorials/installing-packages.rst
@@ -281,9 +281,9 @@ In both of the above cases, Windows users should _not_ use the
:command:`source` command, but should rather run the :command:`activate`
script directly from the command shell like so:
-::
+.. code-block:: bat
- \Scripts\activate
+ \Scripts\activate
@@ -618,10 +618,10 @@ create a helper application that presents the data in a :pep:`503` compliant
index format, and use the ``--extra-index-url`` flag to direct pip to use
that index.
-::
+.. code-block:: bash
- ./s3helper --port=7777
- python -m pip install --extra-index-url http://localhost:7777 SomeProject
+ ./s3helper --port=7777
+ python -m pip install --extra-index-url http://localhost:7777 SomeProject
Installing Prereleases