modelmat / sphinxcontrib-drawio

Sphinx extension for including draw.io files.
MIT License
39 stars 17 forks source link

Make sphinxcontrib-drawio depend on sphinx #65

Closed MarioSchwalbe closed 2 years ago

MarioSchwalbe commented 2 years ago

As of version 0.0.14, I get:

$ python3 -m pip show sphinxcontrib-drawio
Name: sphinxcontrib-drawio
Version: 0.0.14
Summary: Sphinx Extension to include draw.io files
Home-page: https://github.com/Modelmat/sphinxcontrib-drawio
Author: Modelmat
Author-email: modelmat@outlook.com.au
License: MIT
Location: /usr/local/lib/python3.9/site-packages
Requires:
Required-by:

But on our build server:

$ python3 -m pip install -r requirements.txt

Results in:

      ...
      File "<frozen importlib._bootstrap>", line 991, in _find_and_load
      File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 848, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/tmp/pip-install-iei10cwa/sphinxcontrib-drawio/sphinxcontrib/drawio/__init__.py", line 16, in <module>
        from sphinx.application import Sphinx
    ModuleNotFoundError: No module named 'sphinx'
    ----------------------------------------

Which is plausible, since pip is permitted to install packages in any order if they don't depend on each other. I guess this is just a missing dependency.

Thanks a lot.

modelmat commented 2 years ago

Looks like what's happening here is when I switched to using a setup.cfg over items in setup.py, I forgot to include the install dependencies in that file, so requirements.txt isn't actually looked at by pypi/pip.

Could you take a look at updating this yourself? I haven't touched Python packaging much in over a year and remember much of it. I'd be happy to merge & push an updated change.