[Debian] The sphinx doc does not build properly.
Dear developers,
While building the debian package, I encountered a series of warnings at the build doc step.
PYTHONPATH=. sphinx-build -b html -c ./ -E -N . build/sphinx/html
Running Sphinx v1.6.5
making output directory...
Generating grammar tables from /usr/share/sphinx/pycode/Grammar-py2.txt
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 5 source files that are out of date
updating environment: 5 added, 0 changed, 0 removed
reading sources... [ 20%] README
reading sources... [ 40%] src/mailmanclient/docs/NEWS
reading sources... [ 60%] src/mailmanclient/docs/apiref
reading sources... [ 80%] src/mailmanclient/docs/testing
reading sources... [100%] src/mailmanclient/docs/using
/<<PKGBUILDDIR>>/src/mailmanclient/docs/apiref.rst:5: WARNING: autodoc: failed to import class u'Client' from module u'mailmanclient'; the following exception was raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/sphinx/ext/autodoc.py", line 658, in import_object
__import__(self.modname)
ImportError: No module named mailmanclient
/<<PKGBUILDDIR>>/src/mailmanclient/docs/apiref.rst:11: WARNING: autodoc: failed to import class u'Domain' from module u'mailmanclient._client'; the following exception was raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/sphinx/ext/autodoc.py", line 658, in import_object
__import__(self.modname)
ImportError: No module named mailmanclient._client
/<<PKGBUILDDIR>>/src/mailmanclient/docs/apiref.rst:15: WARNING: autodoc: failed to import class u'MailingList' from module u'mailmanclient._client'; the following exception was raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/sphinx/ext/autodoc.py", line 658, in import_object
__import__(self.modname)
ImportError: No module named mailmanclient._client
/<<PKGBUILDDIR>>/src/mailmanclient/docs/apiref.rst:19: WARNING: autodoc: failed to import class u'ListArchivers' from module u'mailmanclient._client'; the following exception was raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/sphinx/ext/autodoc.py", line 658, in import_object
__import__(self.modname)
ImportError: No module named mailmanclient._client
/<<PKGBUILDDIR>>/src/mailmanclient/docs/apiref.rst:23: WARNING: autodoc: failed to import class u'Bans' from module u'mailmanclient._client'; the following exception was raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/sphinx/ext/autodoc.py", line 658, in import_object
__import__(self.modname)
ImportError: No module named mailmanclient._client
/<<PKGBUILDDIR>>/src/mailmanclient/docs/apiref.rst:27: WARNING: autodoc: failed to import class u'BannedAddress' from module u'mailmanclient._client'; the following exception was raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/sphinx/ext/autodoc.py", line 658, in import_object
__import__(self.modname)
ImportError: No module named mailmanclient._client
/<<PKGBUILDDIR>>/src/mailmanclient/docs/apiref.rst:31: WARNING: autodoc: failed to import class u'HeaderMatches' from module u'mailmanclient._client'; the following exception was raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/sphinx/ext/autodoc.py", line 658, in import_object
__import__(self.modname)
ImportError: No module named mailmanclient._client
/<<PKGBUILDDIR>>/src/mailmanclient/docs/apiref.rst:35: WARNING: autodoc: failed to import class u'HeaderMatch' from module u'mailmanclient._client'; the following exception was raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/sphinx/ext/autodoc.py", line 658, in import_object
__import__(self.modname)
ImportError: No module named mailmanclient._client
/<<PKGBUILDDIR>>/src/mailmanclient/docs/apiref.rst:39: WARNING: autodoc: failed to import class u'Member' from module u'mailmanclient._client'; the following exception was raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/sphinx/ext/autodoc.py", line 658, in import_object
__import__(self.modname)
ImportError: No module named mailmanclient._client
/<<PKGBUILDDIR>>/src/mailmanclient/docs/apiref.rst:43: WARNING: autodoc: failed to import class u'User' from module u'mailmanclient._client'; the following exception was raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/sphinx/ext/autodoc.py", line 658, in import_object
__import__(self.modname)
ImportError: No module named mailmanclient._client
/<<PKGBUILDDIR>>/src/mailmanclient/docs/apiref.rst:47: WARNING: autodoc: failed to import class u'Addresses' from module u'mailmanclient._client'; the following exception was raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/sphinx/ext/autodoc.py", line 658, in import_object
__import__(self.modname)
ImportError: No module named mailmanclient._client
/<<PKGBUILDDIR>>/src/mailmanclient/docs/apiref.rst:51: WARNING: autodoc: failed to import class u'Address' from module u'mailmanclient._client'; the following exception was raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/sphinx/ext/autodoc.py", line 658, in import_object
__import__(self.modname)
ImportError: No module named mailmanclient._client
/<<PKGBUILDDIR>>/src/mailmanclient/docs/apiref.rst:55: WARNING: autodoc: failed to import class u'HeldMessage' from module u'mailmanclient._client'; the following exception was raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/sphinx/ext/autodoc.py", line 658, in import_object
__import__(self.modname)
ImportError: No module named mailmanclient._client
/<<PKGBUILDDIR>>/src/mailmanclient/docs/apiref.rst:59: WARNING: autodoc: failed to import class u'Preferences' from module u'mailmanclient._client'; the following exception was raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/sphinx/ext/autodoc.py", line 658, in import_object
__import__(self.modname)
ImportError: No module named mailmanclient._client
/<<PKGBUILDDIR>>/src/mailmanclient/docs/apiref.rst:63: WARNING: autodoc: failed to import class u'Settings' from module u'mailmanclient._client'; the following exception was raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/sphinx/ext/autodoc.py", line 658, in import_object
__import__(self.modname)
ImportError: No module named mailmanclient._client
/<<PKGBUILDDIR>>/src/mailmanclient/docs/apiref.rst:67: WARNING: autodoc: failed to import class u'Queue' from module u'mailmanclient._client'; the following exception was raised:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/sphinx/ext/autodoc.py", line 658, in import_object
__import__(self.modname)
ImportError: No module named mailmanclient._client
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [ 20%] README
writing output... [ 40%] src/mailmanclient/docs/NEWS
writing output... [ 60%] src/mailmanclient/docs/apiref
writing output... [ 80%] src/mailmanclient/docs/testing
writing output... [100%] src/mailmanclient/docs/using
The reason of these import errors is that the conf.py inserts to sys.path an APP_ROOT path that is at the root of the project. So when it searches for mailmanclient, it doesn't find it, as it's in src/ dir.
When patching conf.py accordingly, there is one remaining error: mailmanclient._client.Domain does not exist.
Is it my sphinx command that's wrong?
Btw, python3 version of sphinx can't build the doc, as there is str/bytes issues.
Cheers!