public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-3971] Revert "doc: Modernize baseconf.py." Date: Mon, 14 Nov 2022 08:37:25 +0000 (GMT) [thread overview] Message-ID: <20221114083725.B0DE43835781@sourceware.org> (raw) https://gcc.gnu.org/g:574767073b2fd0c96b93e3cb5e3d93e79555bb62 commit r13-3971-g574767073b2fd0c96b93e3cb5e3d93e79555bb62 Author: Martin Liska <mliska@suse.cz> Date: Sun Nov 13 21:56:06 2022 +0100 Revert "doc: Modernize baseconf.py." This reverts commit dd31c6923fbe8352f7efa830c47c6d0ab31cfce8. Diff: --- doc/baseconf.py | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/doc/baseconf.py b/doc/baseconf.py index 8021a101e77..d85659e4540 100644 --- a/doc/baseconf.py +++ b/doc/baseconf.py @@ -11,31 +11,29 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. # import os -import sys import time -from pathlib import Path - -# Build paths and add path to gcc_sphinx.py extension. -folder = Path(__file__).resolve().parent -doc_modules = folder / 'modules' -gcc_srcdir = folder / '..' / 'gcc' - -sys.path.insert(0, str(doc_modules)) +import sys -# gccint needs a deeper stack limit. +# gccint needs a deeper stack limit sys.setrecursionlimit(2000) # -- Project information ----------------------------------------------------- +# The full version, including alpha/beta/rc tags + +folder = os.path.dirname(os.path.realpath(__file__)) +doc_modules = os.path.join(folder, 'modules') +gcc_srcdir = os.path.join(folder, '..', 'gcc') + +sys.path.insert(0, doc_modules) def read_file(name): - path = gcc_srcdir / name - if path.exists(): + path = os.path.join(gcc_srcdir, name) + if os.path.exists(path): return open(path).read().strip() else: return '' - def __get_builder_name(): if '-b' in sys.argv: return sys.argv[sys.argv.index('-b') + 1] @@ -126,14 +124,14 @@ html_theme_options = { 'navigation_with_keys': True, } -html_logo = str(folder / 'logo.svg') +html_logo = os.path.join(folder, 'logo.svg') -html_favicon = str(folder / 'favicon.ico') +html_favicon = os.path.join(folder, 'favicon.ico') html_last_updated_fmt = '' html_static_path = [ - str(folder / '_static') + os.path.join(folder, '_static') ] html_css_files = [ @@ -151,7 +149,7 @@ suppress_warnings = [ # Use xelatex by default latex_engine = 'xelatex' -latex_logo = str(folder / 'logo.pdf') +latex_logo = os.path.join(folder, 'logo.pdf') latex_elements = { 'pointsize': '11pt', @@ -217,4 +215,4 @@ def set_common(name, module): module['tags'].add('development') html_theme_options['source_edit_link'] = f'https://gcc.gnu.org/onlinedocs/{name}' \ - '/_sources/{filename}.txt' + '/_sources/{filename}.txt'
reply other threads:[~2022-11-14 8:37 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221114083725.B0DE43835781@sourceware.org \ --to=marxin@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).