Skip to content

Commit

Permalink
Redo installation page
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Dec 8, 2019
1 parent 1ee2240 commit 6706131
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 27 deletions.
12 changes: 10 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,17 @@
# built documents.
#
# The short X.Y version.
version = '5.0' # CHANGEME
version = '5.0' # CHANGEME
# The full version, including alpha/beta/rc tags.
release = '5.0b1' # CHANGEME
release = '5.0b1' # CHANGEME
# The date of release, in "monthname day, year" format.
release_date = 'November 11, 2019' # CHANGEME

rst_epilog = """
.. |release_date| replace:: {release_date}
.. |coverage-equals-release| replace:: coverage=={release}
.. |doc-url| replace:: https://coverage.readthedocs.io/en/coverage-{release}
""".format(release=release, release_date=release_date)

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
46 changes: 21 additions & 25 deletions doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ You can install coverage.py in the usual ways. The simplest way is with pip::

$ pip install --pre coverage

or the exact version you want to install:

.. parsed-literal::
$ pip install |coverage-equals-release|
.. _install_extension:

Expand All @@ -34,6 +39,20 @@ this extension: it is much faster, and is needed to support a number of
coverage.py features. Most of the time, the C extension will be installed
without any special action on your part.

You can determine if you are using the extension by looking at the output of
``coverage --version``:

.. parsed-literal::
$ coverage --version
Coverage.py, version |release| with C extension
Documentation at |doc-url|
The first line will either say "with C extension," or "without C extension."

If you are missing the extension, first make sure you have the latest version
of pip in use when installing coverage.

If you are installing on Linux, you may need to install the python-dev and gcc
support files before installing coverage via pip. The exact commands depend on
which package manager you use, which Python version you are using, and the
Expand All @@ -45,49 +64,26 @@ names of the packages for your distribution. For example::
$ sudo apt-get install python3-dev gcc
$ sudo yum install python3-devel gcc

You can determine if you are using the extension by looking at the output of
``coverage --version``::

$ coverage --version
Coverage.py, version |release| with C extension
Documentation at https://coverage.readthedocs.io

The first line will either say "with C extension," or "without C extension."

A few features of coverage.py aren't supported without the C extension, such
as concurrency and plugins.


Installing on Windows
---------------------

For Windows, kits are provided on the `PyPI page`__ for different versions of
Python and different CPU architectures. These kits require that `setuptools`_
be installed as a pre-requisite, but otherwise are self-contained. They have
the C extension pre-compiled so there's no need to worry about compilers.

.. __: coverage_pypi_


Checking the installation
-------------------------

If all went well, you should be able to open a command prompt, and see
coverage.py installed properly:

.. In the output below, the URL should actually have the release in it for
pre-release, but Sphinx couldn't make a URL like that, so whatever.
.. parsed-literal::
$ coverage --version
Coverage.py, version |release| with C extension
Documentation at https://coverage.readthedocs.io
Documentation at |doc-url|
You can also invoke coverage.py as a module:

.. parsed-literal::
$ python -m coverage --version
Coverage.py, version |release| with C extension
Documentation at https://coverage.readthedocs.io
Documentation at |doc-url|

0 comments on commit 6706131

Please sign in to comment.