Skip to content

Commit

Permalink
Fix error message Sphinx
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianWilhelm committed Feb 7, 2018
1 parent eb34890 commit a4cf5ab
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Expand Up @@ -2,6 +2,11 @@
Changelog
=========

Next version
============

- Fix confusing error message when ``python setup.py docs`` and Sphinx is not installed, issue #142

Current version
===============

Expand Down
6 changes: 4 additions & 2 deletions README.rst
Expand Up @@ -80,8 +80,9 @@ Sphinx Documentation
====================

Build the documentation with ``python setup.py docs`` and run doctests with
``python setup.py doctest``. Start editing the file ``docs/index.rst`` to
extend the documentation. The documentation also works with `Read the Docs`_.
``python setup.py doctest`` after you have `Sphinx`_ installed.
Start editing the file ``docs/index.rst`` to extend the documentation.
The documentation also works with `Read the Docs`_.

The `Numpy and Google style docstrings`_ are activated by default.
Just make sure Sphinx 1.3 or above is installed.
Expand Down Expand Up @@ -165,6 +166,7 @@ since the git repository of the existing project is not touched!
.. _PEP440: http://www.python.org/dev/peps/pep-0440/
.. _pre-commit hooks: http://pre-commit.com/
.. _py.test: http://pytest.org/
.. _Sphinx: http://www.sphinx-doc.org/
.. _Read the Docs: https://readthedocs.org/
.. _Numpy and Google style docstrings: http://sphinx-doc.org/latest/ext/napoleon.html
.. _pytest-runner: https://pypi.python.org/pypi/pytest-runner
Expand Down
6 changes: 4 additions & 2 deletions docs/features.rst
Expand Up @@ -70,8 +70,9 @@ Sphinx Documentation
====================

Build the documentation with ``python setup.py docs`` and run doctests with
``python setup.py doctest``. Start editing the file ``docs/index.rst`` to
extend the documentation. The documentation also works with `Read the Docs`_.
``python setup.py doctest`` after you have `Sphinx`_ installed.
Start editing the file ``docs/index.rst`` to extend the documentation.
The documentation also works with `Read the Docs`_.

The `Numpy and Google style docstrings`_ are activated by default.
Just make sure Sphinx 1.3 or above is installed.
Expand Down Expand Up @@ -211,6 +212,7 @@ remove a feature which was once added.
.. _setuptools: http://setuptools.readthedocs.io/en/latest/setuptools.html
.. _setuptools' documentation: http://setuptools.readthedocs.io/en/latest/setuptools.html#configuring-setup-using-setup-cfg-files
.. _namespace packages: http://pythonhosted.org/setuptools/setuptools.html#namespace-packages
.. _Sphinx: http://www.sphinx-doc.org/
.. _Read the Docs: https://readthedocs.org/
.. _tox documentation: http://tox.readthedocs.org/en/latest/
.. _Numpy and Google style docstrings: http://sphinx-doc.org/latest/ext/napoleon.html
Expand Down
1 change: 1 addition & 0 deletions src/pyscaffold/integration.py
Expand Up @@ -110,6 +110,7 @@ def pyscaffold_keyword(dist, keyword, value):
if any(matching_fallbacks):
value.pop('root', None)
dist.metadata.version = get_version(**value)
dist.cmdclass['docs'] = build_cmd_docs()
dist.cmdclass['doctest'] = build_cmd_docs()
dist.command_options['doctest'] = {'builder': ('setup.py', 'doctest')}
dist.cmdclass['test'] = PyTest

0 comments on commit a4cf5ab

Please sign in to comment.