@@ -48,8 +48,7 @@ autosummary_generate = True
4848autosummary_imported_members = False
4949
5050project = '@PROJECT_NAME@'
51- version = '@PROJECT_VERSION@'
52- version_suffix = '@VERSION_SUFFIX@'
51+ version = '@BRANCH_FOR_DOC@'
5352
5453# this makes the current project version available as var in every rst file
5554rst_epilog = """
@@ -100,9 +99,7 @@ html_context = {
10099 # Version switcher flyout (rendered by _templates/versions.html, which
101100 # overrides the empty versions.html shipped by sphinx_rtd_theme 3.x). The
102101 # list is static -- update it when a new release line is published.
103- # current_version is the "v: <x>" label: "unstable" on the dev branch (set
104- # via VERSION_SUFFIX in the top-level CMakeLists.txt), else this release line.
105- 'current_version': '@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.x' if version_suffix == '' else 'unstable',
102+ 'current_version': version,
106103 'versions': [
107104 ['unstable', 'https://triqs.github.io/@PROJECT_NAME@/unstable/'],
108105 ['4.0.x', 'https://triqs.github.io/@PROJECT_NAME@/4.0.x/'],
@@ -180,7 +177,7 @@ def mark_autosummary_sources(app, docname, source):
180177 Sphinx hook to mark rst files that contain an autosummary directive.
181178
182179 This is needed in the processing hook to identify files with autosummary
183- directives.
180+ directives.
184181
185182 Parameters
186183 ----------
@@ -222,7 +219,7 @@ def process_docstring(app, what, name, obj, options, lines):
222219 """
223220 if not lines:
224221 return
225-
222+
226223 # process doc string only for autosummary tables
227224 docname = app.env.temp_data.get('docname') or getattr(app.env, 'docname', None)
228225 if docname in getattr(app.env, "_docs_with_autosummary", set()):
@@ -233,7 +230,7 @@ def process_docstring(app, what, name, obj, options, lines):
233230 first_line = lines[first_idx] if first_idx is not None else None
234231 if not first_line:
235232 return
236-
233+
237234 # handle wrapped classes with no description
238235 if first_line == 'Dispatched C++ constructor(s).' or first_line == 'Synthesized constructor with the following keyword arguments:':
239236 # somehow this not only changes the table but also the actual documentation page
@@ -258,7 +255,7 @@ def process_docstring(app, what, name, obj, options, lines):
258255 match = _dispatched_desc_re.match(doc_str)
259256
260257 # we only care about lines[0] since autosummary uses it for the function table
261- lines[0] = match.group(2) if match.group(1) else doc_str
258+ lines[0] = match.group(2) if match.group(1) else doc_str
262259 lines[1] = ''
263260
264261
0 commit comments