VACUMM / sphinx-fortran

Fortran domain and autodoc extensions to Sphinx
Other
45 stars 29 forks source link

cannot import extention #19

Open zengtianli opened 5 years ago

zengtianli commented 5 years ago

PC configuration: OS ubuntu 16.04

I read some blogs about it includes: google groups(https://groups.google.com/forum/#!topic/sphinx-users/gQfMxDsXQo0) read the file(https://sphinx-fortran.readthedocs.io/en/latest/) and related GitHub I found it hasn't update for a while, is it still compatible with the new version's sphinx? It is because I cannot import extensions like sphinxfortran.fortran_domain, sphinxfortran.fortran_autodoc in conf.py

the error message is: Running Sphinx v2.1.2

Extension error: Could not import extension sphinxfortran.fortran_autodoc (exception: cannot import name 'Directive' from 'sphinx.directives' (unknown location))

Running Sphinx v2.1.2

Extension error: Could not import extension sphinxfortran.fortran_domain (exception: cannot import name 'Directive' from 'sphinx.util.compat' (/home/tianli/anaconda3/lib/python3.7/site-packages/sphinx/util/compat.py))

ndarmage commented 3 years ago

I am using the extension successfully with sphinx v.3.5.3 (OS Win10 and CentOS7).

extensions = [ 'sphinx.ext.autodoc', ... 'sphinxcontrib.bibtex', 'sphinx.ext.mathjax', 'sphinxfortran.fortran_domain', 'sphinxfortran.fortran_autodoc' ] # from my conf.py

installed from https://pypi.org/project/sphinx-fortran/