Changeset 07f151f in rtems-docs
- Timestamp:
- 11/10/22 04:32:44 (5 months ago)
- Branches:
- 5
- Children:
- 031cb12
- Parents:
- 30e5832
- Location:
- common
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
common/conf.py
r30e5832 r07f151f 1 import version as rtems_version1 import datetime 2 2 3 3 extensions = [ … … 13 13 ] 14 14 15 bibtex_bibfiles = ['../common/refs.bib'] 16 15 17 extlinks = {'release_path': ('https://ftp.rtems.org/pub/rtems/releases', None) } 16 18 … … 29 31 # General information about the project. 30 32 project = u'RTEMS Documentation Project' 31 copyright = u'1988, 2020RTEMS Project and contributors'33 copyright = u'1988, ' + str(datetime.datetime.now().year) + ' RTEMS Project and contributors' 32 34 33 35 # The version info for the project you're documenting, acts as replacement for … … 36 38 # 37 39 # The short X.Y version. 38 version = rtems_version.version()40 #version = rtems_version.version() 39 41 40 42 # The full version, including alpha/beta/rc tags. 41 release = rtems_version.string() 42 43 major = rtems_version.major() 44 minor = rtems_version.minor() 45 revision = rtems_version.revision() 43 #release = rtems_version.string() 46 44 47 45 # The language for content autogenerated by Sphinx. Refer to documentation … … 75 73 # The name of the Pygments (syntax highlighting) style to use. 76 74 pygments_style = 'sphinx' 75 76 # http://www.sphinx-doc.org/en/master/usage/configuration.html#confval-numfig 77 numfig = True 77 78 78 79 # A list of ignored prefixes for module index sorting. -
common/latex.py
r30e5832 r07f151f 4 4 5 5 import os 6 import platform7 6 import re 8 7 … … 83 82 uname = os.uname() 84 83 if uname[0] == 'Linux': 85 distro = platform.dist() 84 try: 85 from distro import linux_distribution 86 except: 87 from platform import linux_distribution 88 distro = linux_distribution() 86 89 name = '%s/%s' % (uname[0], distro[0]) 87 90 version = distro[1] -
common/rtemsdomain.py
r30e5832 r07f151f 8 8 from sphinx.util.nodes import make_refnode 9 9 from sphinx.util.docfields import Field, TypedField 10 11 import version as rtems_version 10 12 11 13 """ … … 31 33 32 34 role_url = { 33 "trac": ("Trac","https://devel.rtems.org"),34 "devel": 35 "www": 36 "buildbot": ("Buildbot Instance","https://buildbot.rtems.org/"),37 "builder": 38 "docs": ("Documentation Site","https://docs.rtems.org/"),39 "lists": 40 "git": ("Git Repositories","https://git.rtems.org/"),41 "ftp": ("FTP File Server","https://ftp.rtems.org/"),42 "review": ("Gerrit Code Review","https://review.rtems.org/"),43 "bugs": 44 "gsoc": ("Google Summer of Code","https://devel.rtems.org/wiki/GSoC/"),45 "socis": 35 "trac": ("Trac", "https://devel.rtems.org"), 36 "devel": ("Developer Site", "https://devel.rtems.org"), 37 "www": ("RTEMS Home", "https://www.rtems.org/"), 38 "buildbot": ("Buildbot Instance", "https://buildbot.rtems.org/"), 39 "builder": ("Builder Site", "https://builder.rtems.org/"), 40 "docs": ("Documentation Site", "https://docs.rtems.org/"), 41 "lists": ("Mailing Lists", "https://lists.rtems.org/"), 42 "git": ("Git Repositories", "https://git.rtems.org/"), 43 "ftp": ("FTP File Server", "https://ftp.rtems.org/"), 44 "review": ("Gerrit Code Review", "https://review.rtems.org/"), 45 "bugs": ("Bugs Database", "https://devel.rtems.org/wiki/Bugs/"), 46 "gsoc": ("Google Summer of Code", "https://devel.rtems.org/wiki/GSoC/"), 47 "socis": ("ESA SOCIS", "https://devel.rtems.org/wiki/SOCIS/") 46 48 } 47 49 48 50 49 51 role_list = { 50 "announce": ("Announce Mailing List", 51 "bugs": ("Bugs Mailing List", 52 "devel": ("Developers Mailing List", 53 "build": ("Build Logs", 54 "users": ("Users Mailing List", 52 "announce": ("Announce Mailing List", "https://lists.rtems.org/mailman/listinfo/announce/"), 53 "bugs": ("Bugs Mailing List", "https://lists.rtems.org/mailman/listinfo/bugs/"), 54 "devel": ("Developers Mailing List", "https://lists.rtems.org/mailman/listinfo/devel/"), 55 "build": ("Build Logs", "https://lists.rtems.org/mailman/listinfo/build"), 56 "users": ("Users Mailing List", "https://lists.rtems.org/mailman/listinfo/users/"), 55 57 "vc": ("Version Control Mailing List", "https://lists.rtems.org/mailman/listinfo/vc/"), 56 58 } … … 120 122 121 123 124 def rtems_replace(app, docname, source): 125 dump = False 126 line = source[0] 127 for key in app.config.replacements: 128 line = line.replace(key, app.config.replacements[key]) 129 source[0] = line 130 131 replacements = { 132 } 122 133 123 134 def setup(app): 135 app.add_config_value('rtems_major', str(app.config.overrides['rtems_major']), True) 136 app.add_config_value('rtems_minor', str(app.config.overrides['rtems_minor']), True) 137 app.add_config_value('rtems_revision', str(app.config.overrides['rtems_revision']), True) 138 major = str(app.config.overrides['rtems_major']) 139 minor = str(app.config.overrides['rtems_minor']) 140 revision = str(app.config.overrides['rtems_revision']) 141 if revision.isdigit(): 142 majminrev = major + '.' + minor + '.' + revision 143 else: 144 majminrev = major + '.' + revision 145 replacements["@rtems-version@"] = str(app.config.overrides['version']) 146 replacements["@rtems-ver-major@"] = major 147 replacements["@rtems-ver-minor@"] = minor 148 replacements["@rtems-ver-revision@"] = revision 149 replacements["@rtems-ver-majminrev@"] = majminrev 150 app.add_config_value('replacements', replacements, True) 151 app.connect('source-read', rtems_replace) 124 152 app.add_domain(RTEMSDomain) 125 153 return {'version': "1.0", 'parallel_read_safe': True} -
common/version.py
r30e5832 r07f151f 112 112 def get(ctx, rtems_major_version): 113 113 global _version 114 global _major 115 global _minor 116 global _revision 114 117 global _date 115 118 global _released … … 185 188 186 189 def revision(): 187 return revision190 return _revision 188 191 189 192 def date(): -
common/waf.py
r30e5832 r07f151f 182 182 rst_node = bld.srcnode.make_node('testbuild/contents.rst') 183 183 rst_node.parent.mkdir() 184 rst_node.write('.. COMMENT test sphinx\n') 184 rst_node.write('.. COMMENT test sphinx' + os.linesep) 185 bib_node = bld.srcnode.make_node('testbuild/refs.bib') 186 bib_node.write(os.linesep) 187 conf_node = bld.srcnode.make_node('testbuild/conf.py') 188 conf_node.write(os.linesep.join(["master_doc='contents'", 189 "bibtex_bibfiles = ['refs.bib']"])) 185 190 bld(rule = bld.kw['rule'], source = rst_node) 186 191 … … 188 193 try: 189 194 ctx.run_build(fragment = 'xx', 190 rule = "${BIN_SPHINX_BUILD} -b html -D extensions=%s - C. out" % (extension),195 rule = "${BIN_SPHINX_BUILD} -b html -D extensions=%s -c . . out" % (extension), 191 196 build_fun = run_sphinx, 192 197 env = ctx.env) … … 267 272 ctx.env.BUILD_PDF = 'yes' 268 273 269 ctx.env BUILD_SINGLEHTML = 'no'274 ctx.env.BUILD_SINGLEHTML = 'no' 270 275 if ctx.options.singlehtml: 271 276 check_inliner = not ctx.env.BIN_INLINER … … 277 282 "(https://github.com/remy/inliner)") 278 283 279 ctx.env BUILD_PLANTUML = 'no'284 ctx.env.BUILD_PLANTUML = 'no' 280 285 if ctx.options.plantuml: 281 286 check_plantuml = not ctx.env.BIN_PUML … … 287 292 "(https://www.npmjs.com/package/node-plantuml)") 288 293 289 ctx.env BUILD_DITAA = 'no'294 ctx.env.BUILD_DITAA = 'no' 290 295 if ctx.options.ditaa: 291 296 # … … 336 341 ctx.path.name)) 337 342 ) 343 env_latex = ctx.env.derive() 344 env_latex.TEXINPUTS = output_dir + ':' 338 345 ctx( 339 346 features = 'tex', … … 341 348 type = ctx.env.LATEX_CMD, 342 349 source = "%s/%s.tex" % (buildtype, ctx.path.name), 343 prompt = 0 350 prompt = 0, 351 env = env_latex 344 352 ) 345 353 ctx.install_files('${PREFIX}',
Note: See TracChangeset
for help on using the changeset viewer.