3636
3737# -- General configuration -----------------------------------------------------
3838
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-
4539# Add any Sphinx extension module names here, as strings. They can be extensions
4640# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
4741try :
@@ -138,17 +132,16 @@ def null(*args, **kwargs):
138132
139133# General information about the project.
140134project = "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 } "
143136
144137# The version info for the project you're documenting, acts as replacement for
145138# |version| and |release|, also used in various other places throughout the
146139# built documents.
147140#
148141# The short X.Y version.
149- version = release_info [ " __version__" ]
142+ version = capsul . __version__
150143# The full version, including alpha/beta/rc tags.
151- release = version
144+ release = capsul . __release__
152145
153146# The language for content autogenerated by Sphinx. Refer to documentation
154147# for a list of supported languages.
@@ -323,17 +316,13 @@ def null(*args, **kwargs):
323316 somaworkflow_version = swver .shortVersion
324317except ImportError :
325318 somaworkflow_version = "2.9"
326- try :
327- import soma .info
328319
329- somabase_version = "%d.%d" % (soma .info .version_major , soma .info .version_minor )
330- except ImportError :
331- somabase_version = "4.6"
320+ import soma
332321
333322pyversion = "%d.%d" % sys .version_info [:2 ]
334323
335324extlinks = {
336- #'somabase': ('https://brainvisa.info/soma-base-' + somabase_version + '/sphinx/%s',
325+ #'somabase': ('https://brainvisa.info/soma-base-' + soma.short_version + '/sphinx/%s',
337326 #'somabase '),
338327 #'somaworkflow': ('https://brainvisa.info/soma-workflow-' + somaworkflow_version + '/sphinx/%s',
339328 #'somaworkflow '),
@@ -345,14 +334,14 @@ def null(*args, **kwargs):
345334# intersphinx_mapping = {'https://docs.python.org/': None}
346335
347336docpath = 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"
349338)
350339
351340intersphinx_mapping = {
352341 "somabase" : (
353342 os .environ .get (
354343 "SOMABASE_INTERSPHINX_URL" ,
355- os .path .join (docpath , "soma-base-" + somabase_version + "/sphinx" ),
344+ os .path .join (docpath , "soma-base-" + soma . short_version + "/sphinx" ),
356345 ),
357346 None ,
358347 ),
0 commit comments