1
0
Fork 0

docs: fixed docs generation on centos-7

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
Jaroslav Škarvada 2025-01-18 22:19:50 +01:00
parent 42c3837f40
commit 300444b236
No known key found for this signature in database
GPG key ID: D8E1C00E076E840B
4 changed files with 4 additions and 4 deletions

View file

@ -38,7 +38,7 @@ export SBINDIR = $(PREFIX)/sbin
export SYSCONFDIR = /etc
export DATADIR = $(PREFIX)/share
export DOCDIR = $(DATADIR)/doc/$(NAME)
PYTHON = $(BINDIR)/python3
export PYTHON = $(BINDIR)/python3
PYLINT = pylint-3
ifeq ($(PYTHON),python2)
PYLINT = pylint-2

View file

@ -31,6 +31,6 @@ with open(args.out, "w") as out_file:
plugin_file = inspect.getfile(plugin)
plugin_name = os.path.basename(plugin_file)[7:-3]
out_file.write("\n")
out_file.write(f"== **{plugin_name}**\n")
out_file.write("== **%s**\n" % plugin_name)
out_file.write(inspect.cleandoc(plugin.__doc__))
out_file.write("\n")

View file

@ -1,7 +1,7 @@
.PHONY: clean
index.html: master.adoc assemblies/*.adoc meta/*.adoc modules/performance/*.adoc ../../tuned/plugins/plugin_*.py
python3 ../../compile_plugin_docs.py modules/performance/ref_available-tuned-plug-ins_intro.adoc modules/performance/ref_available-tuned-plug-ins.adoc
$(PYTHON) ../../compile_plugin_docs.py modules/performance/ref_available-tuned-plug-ins_intro.adoc modules/performance/ref_available-tuned-plug-ins.adoc
asciidoctor -o index.html master.adoc || asciidoc -d book -o index.html master.adoc
install: index.html

View file

@ -11,7 +11,7 @@ import threading
# perf is optional
try:
import perf
except ModuleNotFoundError:
except ImportError:
# if perf is unavailable, it will be disabled later
pass
import select