Skip to content

Commit 5d72414

Browse files
mchehabintel-lab-lkp
authored andcommitted
scripts: sphinx-pre-install: Address issues with OpenSUSE Leap 15.x
On openSUSE Leap 15.6, which is the current LTS version, has two Sphinx packages. The normal one requires Python 3.6, which we don't support anymore. However, it also has Python 3.11 with a newer Sphinx version (7.2.6). Suggest the newer version: Detected OS: openSUSE Leap 15.6. ERROR: at least python 3.7 is required to build the kernel docs Warning: python version is not supported. Warning: better to also install "convert". Warning: better to also install "dot". ERROR: please install "yaml", otherwise, build won't work. You should run: sudo zypper install --no-recommends ImageMagick graphviz python311-pyyaml Sphinx needs to be installed either: 1) via pip/pypi with: Currently not possible. Please upgrade Python to a newer version and run this script again 2) As a package with: sudo zypper install --no-recommends python311-Sphinx Please note that Sphinx >= 3.0 will currently produce false-positive warning when the same name is used for more than one type (functions, structs, enums,...). This is known Sphinx bug. For more details, see: sphinx-doc/sphinx#8313 Can't build as 2 mandatory dependencies are missing Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent b7e9c7f commit 5d72414

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

scripts/sphinx-pre-install.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,22 @@ def give_opensuse_hints(self):
556556

557557
progs["latexmk"] = "texlive-latexmk-bin"
558558

559+
match = re.search(r"(Leap)\s+(\d+).(\d)", self.system_release)
560+
if match:
561+
rel = int(match.group(2))
562+
563+
# Leap 15.x uses Python 3.6, which is not compatible with
564+
# the build system anymore. Suggest Python 3.11
565+
if rel == 15:
566+
if not self.which(self.python_cmd):
567+
self.add_package(self.python_cmd, 0)
568+
569+
progs.update({
570+
"python-sphinx": "python311-Sphinx",
571+
"virtualenv": "python311-virtualenv",
572+
"yaml": "python311-pyyaml",
573+
})
574+
559575
# FIXME: add support for installing CJK fonts
560576
#
561577
# I tried hard, but was unable to find a way to install

0 commit comments

Comments
 (0)