Use docs extra for building docs instructions

With the `docs` install extra in setup.py we can simplify the
setup for building the docs by avoiding the now redundant
docs/doc-requirements.txt and docs/environment.yml.
One change is needed in setup.py though which is to add the
`sphinx-rtd-theme` package to the setup.py `docs` extra install
package list which was in doc-requirements.txt and environment.yml
but missing from setup.py.
Matt Riedemann 6 years ago
parent 503d5e7569
commit d45a46ad54

@ -174,17 +174,17 @@ To build the documentation you'll need `Sphinx <http://www.sphinx-doc.org/>`_,
To install (and activate) a `conda environment`_ named ``notebook_docs``
containing all the necessary packages (except pandoc), use::
conda env create -f docs/environment.yml
conda create -n notebook_docs pip
conda activate notebook_docs # Linux and OS X
activate notebook_docs # Windows
pip install .
pip install .[docs]
.. _conda environment:
https://conda.io/docs/user-guide/tasks/manage-environments.html#creating-an-environment-from-an-environment-yml-file
If you want to install the necessary packages with ``pip``, use the following instead::
pip install . -r docs/doc-requirements.txt
pip install .[docs]
Once you have installed the required packages, you can build the docs with::

@ -118,7 +118,8 @@ for more information.
extras_require = {
'test': ['nose', 'coverage', 'requests', 'nose_warnings_filters',
'nbval', 'nose-exclude', 'selenium', 'pytest', 'pytest-cov'],
'docs': ['sphinx', 'nbsphinx', 'sphinxcontrib_github_alt'],
'docs': ['sphinx', 'nbsphinx', 'sphinxcontrib_github_alt',
'sphinx-rtd-theme'],
'test:sys_platform != "win32"': ['requests-unixsocket'],
},
python_requires = '>=3.5',

Loading…
Cancel
Save