Add suggestion to Contribution Guide to activate flake8 (#6886)
This commit is contained in:
parent
da01c8a541
commit
10ee7d6d81
@ -184,7 +184,9 @@ to update them.
|
|||||||
|
|
||||||
Flake8 requires setuptools in order to run. If you installed ``py-flake8``
|
Flake8 requires setuptools in order to run. If you installed ``py-flake8``
|
||||||
with Spack, make sure to add ``py-setuptools`` to your ``PYTHONPATH``.
|
with Spack, make sure to add ``py-setuptools`` to your ``PYTHONPATH``.
|
||||||
Otherwise, you will get an error message like:
|
The easiest way to do this is to run ``spack activate py-flake8`` so that
|
||||||
|
all of the dependencies are symlinked to a central location. If you see an
|
||||||
|
error message like:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
@ -193,6 +195,8 @@ to update them.
|
|||||||
from pkg_resources import load_entry_point
|
from pkg_resources import load_entry_point
|
||||||
ImportError: No module named pkg_resources
|
ImportError: No module named pkg_resources
|
||||||
|
|
||||||
|
that means Flake8 couldn't find setuptools in your ``PYTHONPATH``.
|
||||||
|
|
||||||
^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^
|
||||||
Documentation Tests
|
Documentation Tests
|
||||||
^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^
|
||||||
@ -216,18 +220,24 @@ installed with Spack:
|
|||||||
|
|
||||||
Sphinx has `several required dependencies <https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/py-sphinx/package.py>`_.
|
Sphinx has `several required dependencies <https://github.com/spack/spack/blob/develop/var/spack/repos/builtin/packages/py-sphinx/package.py>`_.
|
||||||
If you installed ``py-sphinx`` with Spack, make sure to add all of these
|
If you installed ``py-sphinx`` with Spack, make sure to add all of these
|
||||||
dependencies to your ``PYTHONPATH``. The easiest way to do this is to run
|
dependencies to your ``PYTHONPATH``. The easiest way to do this is to run:
|
||||||
``spack activate py-sphinx`` so that all of the dependencies are symlinked
|
|
||||||
to a central location. If you see an error message like:
|
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
||||||
Traceback (most recent call last):
|
$ spack activate py-sphinx
|
||||||
File: "/usr/bin/flake8", line 5, in <module>
|
$ spack activate py-sphinxcontrib-programoutput
|
||||||
from pkg_resources import load_entry_point
|
|
||||||
ImportError: No module named pkg_resources
|
|
||||||
|
|
||||||
that means Sphinx couldn't find setuptools in your ``PYTHONPATH``.
|
so that all of the dependencies are symlinked to a central location.
|
||||||
|
If you see an error message like:
|
||||||
|
|
||||||
|
.. code-block:: console
|
||||||
|
|
||||||
|
Extension error:
|
||||||
|
Could not import extension sphinxcontrib.programoutput (exception: No module named sphinxcontrib.programoutput)
|
||||||
|
make: *** [html] Error 1
|
||||||
|
|
||||||
|
that means Sphinx couldn't find ``py-sphinxcontrib-programoutput`` in your
|
||||||
|
``PYTHONPATH``.
|
||||||
|
|
||||||
Once all of the dependencies are installed, you can try building the documentation:
|
Once all of the dependencies are installed, you can try building the documentation:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user