summaryrefslogtreecommitdiffstats
path: root/doc/conf.py
diff options
context:
space:
mode:
Diffstat (limited to 'doc/conf.py')
-rw-r--r--doc/conf.py41
1 files changed, 30 insertions, 11 deletions
diff --git a/doc/conf.py b/doc/conf.py
index 92594f407..49d19965f 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -17,6 +17,7 @@ import sys
import os
import re
import fileinput
+import subprocess
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@@ -33,6 +34,13 @@ import fileinput
# ones.
extensions = []
+def add_latex_extensions(app, docname, source):
+ if app.builder.name == 'latex':
+ app.setup_extension('sphinxcontrib.rsvgconverter')
+
+def setup(app):
+ app.connect('source-read', add_latex_extensions)
+
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@@ -100,11 +108,11 @@ pygments_style = 'none'
numfig = True
-gnu_target = os.getenv("PTXCONF_GNU_TARGET") or "arm-v5te-linux-gnueabi"
+gnu_target = os.getenv("PTXCONF_GNU_TARGET") or "arm-v7a-linux-gnueabihf"
try:
toolchain = os.readlink(os.path.join(os.getenv("PTXDIST_PLATFORMDIR",""), "selected_toolchain")).split("/")
except:
- toolchain = "/opt/OSELAS.Toolchain-2019.09.1/arm-v5te-linux-gnueabi/gcc-9.2.1-glibc-2.30-binutils-2.32-kernel-5.0-sanitized/bin".split("/")
+ toolchain = "/opt/OSELAS.Toolchain-2022.10.0/arm-v7a-linux-gnueabihf/gcc-12.2.1-clang-15.0.2-glibc-2.36-binutils-2.39-kernel-6.0.5-sanitized/bin".split("/")
ptxdistPlatformName = os.getenv("PTXCONF_PLATFORM", "versatilepb")
ptxdistPlatformDir = "platform-" + ptxdistPlatformName
@@ -124,6 +132,15 @@ ptxdistPlatformCollection = "\ "
ptxdistVendorVersion = os.getenv("PTXDIST_VERSION_YEAR") + "." + os.getenv("PTXDIST_VERSION_MONTH") + "." + os.getenv("PTXDIST_VERSION_BUGFIX")
package = "<package>"
+if "ptxdistonly" in tags.tags.keys():
+ ptxdistBSPSource = "The source of the BSP of your choice."
+else:
+ try:
+ url = subprocess.check_output('git -C "${PTXDIST_WORKSPACE}" remote get-url origin', shell=True).decode().strip()
+ ptxdistBSPSource = f"From git: `{url} <{url}>`_"
+ except subprocess.CalledProcessError as e:
+ ptxdistBSPSource = ptxdistBSPName + ".tar.bz2 (or a similar source)" + str(e)
+
sys.path.append(".")
try:
from replace import *
@@ -141,6 +158,7 @@ replace_dict = {
b"|ptxdistHwVendor|": ptxdistHwVendor,
b"|ptxdistHwProduct|": ptxdistHwProduct,
b"|ptxdistBSPName|": ptxdistBSPName,
+ b"|ptxdistBSPSource|": ptxdistBSPSource,
b"|ptxdistBSPRevision|": ptxdistBSPRevision,
b"|ptxdistCompilerName|": ptxdistCompilerName,
b"|ptxdistCompilerVersion|": ptxdistCompilerVersion,
@@ -172,15 +190,16 @@ html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
-html_context = {
- 'css_files': ['_static/css/custom.css'],
- 'script_files': [
- '_static/js/jquery-3.1.0.min.js',
- '_static/underscore.js',
- '_static/doctools.js',
- '_static/js/main.js',
- ],
-}
+html_css_files = [
+ 'css/custom.css',
+]
+
+html_js_files = [
+ 'js/jquery-3.1.0.min.js',
+ 'underscore.js',
+ 'doctools.js',
+ 'js/main.js',
+]
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".