aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-08-05 16:50:42 -0400
committerDavid Robillard <d@drobilla.net>2022-08-05 22:02:50 -0400
commit7768958f8691d095c7869f212cc6c2233b973228 (patch)
tree898081643046e8f7743a9472d19611b312d9951e
parent5f35f845874911384eeaf8498d4e0120a95392dd (diff)
downloadlv2-7768958f8691d095c7869f212cc6c2233b973228.tar.xz
Fix documentation build with Python 3.7
-rw-r--r--lv2/core.lv2/meta.ttl2
-rwxr-xr-xlv2specgen/lv2specgen.py4
-rwxr-xr-xscripts/lv2_build_index.py4
3 files changed, 6 insertions, 4 deletions
diff --git a/lv2/core.lv2/meta.ttl b/lv2/core.lv2/meta.ttl
index ef30704..dd9650a 100644
--- a/lv2/core.lv2/meta.ttl
+++ b/lv2/core.lv2/meta.ttl
@@ -43,6 +43,8 @@ THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH R
rdfs:label "Fix documentation build with meson 0.56.2."
] , [
rdfs:label "Fix lv2.h missing from installation."
+ ] , [
+ rdfs:label "Fix documentation build with Python 3.7."
]
]
] , [
diff --git a/lv2specgen/lv2specgen.py b/lv2specgen/lv2specgen.py
index 0c5a87d..5f06af3 100755
--- a/lv2specgen/lv2specgen.py
+++ b/lv2specgen/lv2specgen.py
@@ -148,7 +148,7 @@ def isLiteral(n):
def niceName(uri):
global spec_bundle
if uri.startswith(spec_ns_str):
- return uri.removeprefix(spec_ns_str)
+ return uri.replace(spec_ns_str, "")
elif uri == str(rdfs.seeAlso):
return "See also"
@@ -823,7 +823,7 @@ def getShortName(uri):
def getAnchor(uri):
uri = str(uri)
if uri.startswith(spec_ns_str):
- return uri.removeprefix(spec_ns_str).replace("/", "_")
+ return uri.replace(spec_ns_str, "").replace("/", "_")
else:
return getShortName(uri)
diff --git a/scripts/lv2_build_index.py b/scripts/lv2_build_index.py
index c0e4395..39d933c 100755
--- a/scripts/lv2_build_index.py
+++ b/scripts/lv2_build_index.py
@@ -62,7 +62,7 @@ def _warn(message):
def _spec_target(spec, root, online=False):
"Return the relative link target for a specification."
- target = spec.removeprefix(root) if spec.startswith(root) else spec
+ target = spec.replace(root, "") if spec.startswith(root) else spec
return target if online else target + ".html"
@@ -144,7 +144,7 @@ def index_row(model, spec, root_uri, online):
row += _spec_link_columns(
spec,
root_uri,
- model.value(spec, doap.name, None).removeprefix("LV2 "),
+ model.value(spec, doap.name, None).replace("LV2 ", ""),
online,
)