36
36
37
37
# -- General configuration -----------------------------------------------------
38
38
39
- # We load the release info into a dict by explicit execution
40
- release_info = {}
41
- finfo = os .path .join (".." , ".." , "capsul" , "info.py" )
42
- with open (finfo ) as f :
43
- exec (compile (f .read (), finfo , "exec" ), release_info )
44
-
45
39
# Add any Sphinx extension module names here, as strings. They can be extensions
46
40
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
47
41
try :
@@ -138,17 +132,16 @@ def null(*args, **kwargs):
138
132
139
133
# General information about the project.
140
134
project = "CAPSUL"
141
- release_info ["COPYRIGHT_YEAR" ] = time .strftime ("%Y" )
142
- copyright = "%(COPYRIGHT_YEAR)s, %(AUTHOR)s <%(AUTHOR_EMAIL)s>" % release_info
135
+ copyright = f"{ time .strftime ('%Y' )} , { capsul .organization_name } "
143
136
144
137
# The version info for the project you're documenting, acts as replacement for
145
138
# |version| and |release|, also used in various other places throughout the
146
139
# built documents.
147
140
#
148
141
# The short X.Y version.
149
- version = release_info [ " __version__" ]
142
+ version = capsul . __version__
150
143
# The full version, including alpha/beta/rc tags.
151
- release = version
144
+ release = capsul . __release__
152
145
153
146
# The language for content autogenerated by Sphinx. Refer to documentation
154
147
# for a list of supported languages.
@@ -323,17 +316,13 @@ def null(*args, **kwargs):
323
316
somaworkflow_version = swver .shortVersion
324
317
except ImportError :
325
318
somaworkflow_version = "2.9"
326
- try :
327
- import soma .info
328
319
329
- somabase_version = "%d.%d" % (soma .info .version_major , soma .info .version_minor )
330
- except ImportError :
331
- somabase_version = "4.6"
320
+ import soma
332
321
333
322
pyversion = "%d.%d" % sys .version_info [:2 ]
334
323
335
324
extlinks = {
336
- #'somabase': ('https://brainvisa.info/soma-base-' + somabase_version + '/sphinx/%s',
325
+ #'somabase': ('https://brainvisa.info/soma-base-' + soma.short_version + '/sphinx/%s',
337
326
#'somabase '),
338
327
#'somaworkflow': ('https://brainvisa.info/soma-workflow-' + somaworkflow_version + '/sphinx/%s',
339
328
#'somaworkflow '),
@@ -345,14 +334,14 @@ def null(*args, **kwargs):
345
334
# intersphinx_mapping = {'https://docs.python.org/': None}
346
335
347
336
docpath = os .path .join (
348
- os .path .dirname (os .path .dirname (os .path .dirname (soma .__file__ ))), "share" , "doc"
337
+ os .path .dirname (os .path .dirname (os .path .dirname (os . path . dirname ( soma .__path__ [ 1 ]) ))), "share" , "doc"
349
338
)
350
339
351
340
intersphinx_mapping = {
352
341
"somabase" : (
353
342
os .environ .get (
354
343
"SOMABASE_INTERSPHINX_URL" ,
355
- os .path .join (docpath , "soma-base-" + somabase_version + "/sphinx" ),
344
+ os .path .join (docpath , "soma-base-" + soma . short_version + "/sphinx" ),
356
345
),
357
346
None ,
358
347
),
0 commit comments