ukoethe / vigra

a generic C++ library for image analysis
http://ukoethe.github.io/vigra/
Other
407 stars 191 forks source link

vigranumpy build error with sphinx 4 #502

Closed ametzler closed 1 year ago

ametzler commented 2 years ago

Sphinx documentation generation fails after upgrading to sphinx 4:

cd /dev/shm/VIGRA/libvigraimpex-1.11.1/obj.x86_64-linux-gnu/vigranumpy/docsrc && /usr/bin/sphinx-build -b html -d /dev/shm/VIGRA/libvigraimpex-1.11.1/doc/vigranumpy/doctrees -D latex_paper_size=a4 -c /dev/shm/VIGRA/libvigraimpex-1.11.1/obj.x86_64-linux-gnu/vigranumpy/docsrc /dev/shm/VIGRA/libvigraimpex-1.11.1/vigranumpy/docsrc /dev/shm/VIGRA/libvigraimpex-1.11.1/doc/vigranumpy
Running Sphinx v4.2.0

Configuration error:
There is a syntax error in your configuration file: invalid syntax (conf.py, line 25)

Commenting out the offending stanza in vigranumpy/docsrc/conf.py.in seems to work:

--- libvigraimpex-1.11.1+dfsg.orig/vigranumpy/docsrc/conf.py.in
+++ libvigraimpex-1.11.1+dfsg/vigranumpy/docsrc/conf.py.in
@@ -14,23 +14,6 @@
 from __future__ import division, print_function
 import sys, os, re

-# silent lots of 'arg is not a Python function' warnings
-import inspect
-
-_original_getargspec = inspect.getargspec
-
-def _getargspec_workaround(*args, **kw):
-    try:
-        return _original_getargspec(*args, **kw)
-    except TypeError, e:
-        if str(e).startswith('arg is not a Python function'):
-            return inspect.ArgSpec([], None, None, None)
-        else:
-            raise
-
-inspect.getargspec = _getargspec_workaround
-_getargspec_workaround.__module__ = 'inspect'
-
 # set the PATH of the current build, so that we don't create
 # documentation for a possibly outdated installation
 vigranumpy_path=r'@VIGRANUMPY_TMP_PATH@'

cu Andreas

ametzler commented 2 years ago

Alternatively (by Omari Stephens): 0003-Updates-doc-generation-config-for-Python-3-compatibi.patch.txt