Skip to content

Commit d45a46a

Browse files
committed
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.
1 parent 503d5e7 commit d45a46a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

CONTRIBUTING.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,17 +174,17 @@ To build the documentation you'll need `Sphinx <http://www.sphinx-doc.org/>`_,
174174
To install (and activate) a `conda environment`_ named ``notebook_docs``
175175
containing all the necessary packages (except pandoc), use::
176176

177-
conda env create -f docs/environment.yml
177+
conda create -n notebook_docs pip
178178
conda activate notebook_docs # Linux and OS X
179179
activate notebook_docs # Windows
180-
pip install .
180+
pip install .[docs]
181181

182182
.. _conda environment:
183183
https://conda.io/docs/user-guide/tasks/manage-environments.html#creating-an-environment-from-an-environment-yml-file
184184

185185
If you want to install the necessary packages with ``pip``, use the following instead::
186186

187-
pip install . -r docs/doc-requirements.txt
187+
pip install .[docs]
188188

189189
Once you have installed the required packages, you can build the docs with::
190190

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@
118118
extras_require = {
119119
'test': ['nose', 'coverage', 'requests', 'nose_warnings_filters',
120120
'nbval', 'nose-exclude', 'selenium', 'pytest', 'pytest-cov'],
121-
'docs': ['sphinx', 'nbsphinx', 'sphinxcontrib_github_alt'],
121+
'docs': ['sphinx', 'nbsphinx', 'sphinxcontrib_github_alt',
122+
'sphinx-rtd-theme'],
122123
'test:sys_platform != "win32"': ['requests-unixsocket'],
123124
},
124125
python_requires = '>=3.5',

0 commit comments

Comments
 (0)