[pytango] 65/98: Update doc configuration imports
Sandor Bodo-Merle
sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:17:46 UTC 2017
This is an automated email from the git hooks/post-receive script.
sbodomerle-guest pushed a commit to tag v9.2.0
in repository pytango.
commit 57f4c2a193387442d9053da345e6b7f70766f722
Author: Vincent Michel <vincent.michel at maxlab.lu.se>
Date: Fri Jul 8 16:39:57 2016 +0200
Update doc configuration imports
---
doc/conf.py | 33 ++++++++++++++++++---------------
1 file changed, 18 insertions(+), 15 deletions(-)
diff --git a/doc/conf.py b/doc/conf.py
index 8bccd14..f4d0efd 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -12,10 +12,13 @@
import sys
import os
import re
-import PyTango
-print("Building documentation for PyTango {0}".format(PyTango.__version_long__))
-print("Using PyTango from: {0}".format(os.path.dirname(PyTango.__file__)))
+# tango imports
+import tango
+from tango import Release
+
+print("Building documentation for PyTango {0}".format(Release.version_long))
+print("Using PyTango from: {0}".format(os.path.dirname(tango.__file__)))
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@@ -72,9 +75,9 @@ is licensed under a
# built documents.
#
# The short X.Y version.
-version = '.'.join(PyTango.Release.version.split('.')[:2])
+version = '.'.join(Release.version.split('.')[:2])
# The full version, including alpha/beta/rc tags.
-release = PyTango.Release.version_long
+release = Release.version_long
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -213,7 +216,7 @@ latex_elements = {
'fontpkg': '\\usepackage{palatino}',
'papersize': 'a4paper',
'pointsize': '10pt',
-
+
}
latex_show_urls = 'no'
@@ -280,7 +283,7 @@ def type_to_link(tipus):
def type_to_pytango_link(tipus):
if tipus[:9] == 'sequence<' and tipus[-1:] == '>':
return 'sequence<' + type_to_link(tipus[9:-1]) + '>'
- elif tipus in dir(PyTango):
+ elif tipus in dir(tango):
return ':class:`' + tipus + "`"
else:
return tipus
@@ -305,7 +308,7 @@ def parse_parameters(line):
spl = miniLine[2:].split(':', 1)
assert(len(spl) == 2)
-
+
return spaces + ':' + spl[0].strip() + ': ' + parse_typed_line(spl[1])
@@ -385,12 +388,12 @@ def search_ONLY_signature(name, text):
def split_signature(text):
if text is None:
return None
-
+
# split "fname(params)", "returntype"
ops = text.split('->')
if len(ops) != 2:
return None
-
+
# get rid of "fname"
params = ops[0].strip()
ret_type = ops[1].strip()
@@ -399,9 +402,9 @@ def split_signature(text):
return None
params = params[p:]
return params, ret_type
-
-
+
+
_with_only_one_signature_methods = {}
def __reformat_lines(app, what, name, obj, options, lines):
@@ -416,7 +419,7 @@ def __reformat_lines(app, what, name, obj, options, lines):
parsingThrows = False
toinsert.append((0, ""))
-
+
for ln in range(len(lines)):
line = lines[ln]
@@ -458,7 +461,7 @@ def __reformat_lines(app, what, name, obj, options, lines):
# with the one understood by reStructuredText ":Return: something"
spl = line.strip().split(':', 1)
control_word = spl[0].strip()
-
+
if ((len(spl) != 2)
or (control_word not in ["Parameters", "Return", "Throws", "Example", "See Also" ]) ):
if parsingParameters:
@@ -516,6 +519,6 @@ def setup(app):
# Problem is __process_signature works great with python methods...
# but is not even called for methods defined by boost. So, as it is,
# is useless now.
-
+
#app.connect('autodoc-process-signature', __process_signature)
app.connect('autodoc-process-docstring', __reformat_lines)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytango.git
More information about the debian-science-commits
mailing list