Commit dee83be1 authored by alvy's avatar alvy

docs: rephrased the introduction for optional dependencies

note the use case for tests and docs functions and that "test_require" is deprecated, shorten description of the example
parent 5df7ee40
...@@ -199,12 +199,16 @@ distributions, if the package's dependencies aren't already installed: ...@@ -199,12 +199,16 @@ distributions, if the package's dependencies aren't already installed:
Optional dependencies Optional dependencies
===================== =====================
Setuptools allows you to declare dependencies that only get installed under Setuptools allows you to declare dependencies that only get installed under
specific circumstances. For example, let's say that Project-A offers optional specific circumstances. These dependencies are specified with ``extras_require``
PDF support and requires some additional package for it to work. Such a keyword and are only installed if another package depends on it (either
dependency will be specified with ``extras_require`` keyword and they are only directly or indirectly) This makes it convenient to declare dependencies for
installed if another package depends on it (either directly or indirectly). ancillary functions such as "tests" and "docs".
Let's first see how to specify such package: .. note::
``tests_require`` is now deprecated
For example, Package-A offers optional PDF support and requires two other
dependencies for it to work:
.. code-block:: ini .. code-block:: ini
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment