Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions source/contribute.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ in order to test your changes. In order to build this guide locally, you'll
need:

1. `Nox <https://nox.readthedocs.io/en/latest/>`_. You can install or upgrade
nox using ``pip``::
nox using ``pip``:

.. code-block:: bash

python -m pip install --user nox

Expand All @@ -88,19 +90,23 @@ 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
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.

Expand Down
14 changes: 9 additions & 5 deletions source/guides/distributing-packages-using-setuptools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -698,7 +698,9 @@ Otherwise, the dependency will be fulfilled from PyPI, due to the installation o
<pip:Requirements Files>` section in the pip docs. For more on VCS installs,
see the :ref:`VCS Support <pip: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

Expand Down Expand Up @@ -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 <index>` on
your package files::
your package files:

.. code-block:: bash

twine check dist/*
twine check dist/*

Create an account
-----------------
Expand Down
4 changes: 3 additions & 1 deletion source/guides/dropping-older-python-versions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 5 additions & 3 deletions source/guides/index-mirrors-and-caches.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ cached copies of :term:`packages <Distribution Package>`:
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
<https://pip.readthedocs.io/en/latest/reference/pip_wheel.html>`_::
<https://pip.readthedocs.io/en/latest/reference/pip_wheel.html>`_:

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
Expand Down
6 changes: 4 additions & 2 deletions source/guides/making-a-pypi-friendly-readme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion source/guides/using-manifest-in.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
10 changes: 5 additions & 5 deletions source/tutorials/installing-packages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

<DIR>\Scripts\activate
<DIR>\Scripts\activate



Expand Down Expand Up @@ -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
Expand Down