[Python-modules-team] Bug#834639: Use local interwiki inventory and fix autodoc warnings

Jan-Marek Glogowski glogow at fbihome.de
Wed Aug 17 18:01:11 UTC 2016


Package: python-attr-doc
Version: 16.0.0-1
Severity: minor
Tags: patch

The current build of the Sphinx documentation doesn't use the local
inventories for interwiki references.

I guess due to the suggestion from

https://wiki.debian.org/Python/LibraryStyleGuide#Sphinx_documentation

it actually doesn't refer to any inventory.

The attached patch changes the Sphinx configuration to refer to the
inventories from the python3?-doc packages locally, generating relative
links. I couldn't find a reason to not use the local interwiki inventories.

Additionally the sphinx documentation build skips most of the
documentation, as it cannot find it's own build, so I added the
following lines to conf.py:

+import sys
+sys.path.insert(0, os.path.abspath('../.pybuild/pythonX.Y_2.7/build'))

which fixes the autodoc warnings:

/«PKGBUILDDIR»/docs/api.rst:21: WARNING: autodoc: failed to import
function 's' from module 'attr'; the following exception was raised:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/sphinx/ext/autodoc.py", line 518,
in import_object
    __import__(self.modname)
ImportError: No module named 'attr'

The patch is for Ubuntu Xenial, which has an older version of
python-hypothesis and needs the additional python-enum34 package.

The dh_compress override might also be an Ubuntu debhelper bug, but
otherwise the changes.html will be compressed. I guess from the
dh_compress manpage / description that the html file and changelog case
clash here.

Otherwise it should apply cleanly to your Debian package :-)

HTH

Jan-Marek

P.S. I also didn't check the doc-base files, as I don't use them.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: python_attr_doc_fix.patch
Type: text/x-patch
Size: 25367 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/python-modules-team/attachments/20160817/b72c3d55/attachment-0001.bin>


More information about the Python-modules-team mailing list