vovkos / doxyrest

A compiler from Doxygen XML to reStructuredText -- hence, the name. It parses XML databases generated by Doxygen and produces reStructuredText for the Python documentation generator Sphinx.
MIT License
306 stars 23 forks source link

Sphinx: Error importing extension doxyrest #21

Closed BotellaA closed 5 years ago

BotellaA commented 5 years ago

I am trying to use Doxyrest on Ubuntu 18.04. I installed it from the latest Github release and Sphinx from the package python-sphinx. Here is my error:

$ sphinx-build -b html -c ../../cmake/ rst-dir html-dir
Running Sphinx v1.6.7

Extension error:
Could not import extension doxyrest (exception: cannot import name SphinxBaseFileInput)

I do not understand where this SphinxBaseFileInput class is. There is nothing related to this in the corresponding file https://github.com/sphinx-doc/sphinx/blob/master/sphinx/io.py

BotellaA commented 5 years ago

Ubuntu packages are too old... It is ok using sphinx from pip install sphinx.

vovkos commented 5 years ago

Yeah, turns out Ubuntu 18.04 only provides sphinx-1.6.7 which doesn't have the input file type registry. This registry is used by Doxyrest to override RST file pre-processing and apply tab-width -- which otherwise is hard-coded as 8.

I did a quick search and the very first Sphinx release which provides the input file type registry is sphinx-1.7.0. So Doxyrest requires sphinx-1.7.0 or above. I should mention that in the docs and README.