sphinx-needs
sphinx-needs copied to clipboard
sphinxcontrib.plantuml is no dependency
When setting up a new venv and installing sphinx-needs 1.0.2 with
pip install sphinx-needs
and then importing the library I get an exception:
$ python
Python 3.10.7 (main, Sep 6 2022, 21:22:27) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sphinx_needs
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/marco/.venv/lib/python3.10/site-packages/sphinx_needs/__init__.py", line 2, in <module>
from sphinx_needs.needs import setup # noqa: F401
File "/home/marco/.venv/lib/python3.10/site-packages/sphinx_needs/needs.py", line 11, in <module>
from sphinx_needs.api.configuration import add_extra_option
File "/home/marco/.venv/lib/python3.10/site-packages/sphinx_needs/api/__init__.py", line 7, in <module>
from .need import add_external_need, add_need, del_need, make_hashed_id # noqa: F401
File "/home/marco/.venv/lib/python3.10/site-packages/sphinx_needs/api/need.py", line 25, in <module>
from sphinx_needs.directives.needuml import Needuml, NeedumlException
File "/home/marco/.venv/lib/python3.10/site-packages/sphinx_needs/directives/needuml.py", line 10, in <module>
from sphinx_needs.directives.needflow import make_entity_name
File "/home/marco/.venv/lib/python3.10/site-packages/sphinx_needs/directives/needflow.py", line 10, in <module>
from sphinxcontrib.plantuml import (
ModuleNotFoundError: No module named 'sphinxcontrib.plantuml'
This happens because sphinxcontrib.plantuml is not listed in [tool.poetry.dependencies].
The documentation says it is an optional dependency, however it is already a mandatory import in need.py.
The workaround for this for the time being:
pip install sphinxcontrib-plantuml