Skip to content

Commit 0afdbf7

Browse files
committed
Fis sphinx build
1 parent 0e505eb commit 0afdbf7

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

debian/patches/series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ deb_disable_google_online_snippets
77
# deactivated by [email protected]
88
# deb_git_hash
99
python3.patch
10+
sphinx.patch

debian/patches/sphinx.patch

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
--- a/doc/conf.py
2+
+++ b/doc/conf.py
3+
@@ -70,14 +70,14 @@ autodoc_mock_imports = [
4+
# of parameters.
5+
# Requires pinning sphinxcontrib-napoleon to a specific commit while
6+
# https://github.com/sphinx-contrib/napoleon/pull/10 is merged.
7+
-napoleon_use_param = False
8+
-napoleon_custom_sections = [
9+
- ('Inputs', 'Parameters'),
10+
- ('Outputs', 'Parameters'),
11+
- ('Attributes', 'Parameters'),
12+
- ('Mandatory Inputs', 'Parameters'),
13+
- ('Optional Inputs', 'Parameters'),
14+
-]
15+
+#napoleon_use_param = False
16+
+#napoleon_custom_sections = [
17+
+# ('Inputs', 'Parameters'),
18+
+# ('Outputs', 'Parameters'),
19+
+# ('Attributes', 'Parameters'),
20+
+# ('Mandatory Inputs', 'Parameters'),
21+
+# ('Optional Inputs', 'Parameters'),
22+
+#]
23+
24+
25+
on_rtd = os.environ.get('READTHEDOCS') == 'True'
26+
--- a/doc/requirements.txt
27+
+++ b/doc/requirements.txt
28+
@@ -23,5 +23,4 @@ simplejson>=3.8.0
29+
sphinx-argparse
30+
sphinx>=2.1.2
31+
sphinxcontrib-apidoc
32+
-sphinxcontrib-napoleon
33+
-traits>=4.6
34+
\ No newline at end of file
35+
+traits>=4.6
36+
--- a/nipype/sphinxext/apidoc/docstring.py
37+
+++ b/nipype/sphinxext/apidoc/docstring.py
38+
@@ -2,8 +2,8 @@
39+
# vi: set ft=python sts=4 ts=4 sw=4 et:
40+
"""Reformat interface docstrings."""
41+
import re
42+
-from sphinxcontrib.napoleon._upstream import _
43+
-from sphinxcontrib.napoleon.docstring import NumpyDocstring
44+
+from sphinx.locale import _
45+
+from sphinx.ext.napoleon.docstring import NumpyDocstring
46+
47+
48+
class NipypeDocstring(NumpyDocstring):
49+
--- a/nipype/sphinxext/apidoc/__init__.py
50+
+++ b/nipype/sphinxext/apidoc/__init__.py
51+
@@ -2,7 +2,7 @@
52+
# vi: set ft=python sts=4 ts=4 sw=4 et:
53+
"""Settings for sphinxext.interfaces and connection to sphinx-apidoc."""
54+
import re
55+
-from sphinxcontrib.napoleon import (
56+
+from sphinx.ext.napoleon import (
57+
Config as NapoleonConfig,
58+
_patch_python_domain,
59+
_skip_member as _napoleon_skip_member,

0 commit comments

Comments
 (0)