Skip to content

Commit 0012d9d

Browse files
committed
fix: disable bootstrap extension to solve Sphinx 8.2.3 compatibility issue
- Added code to disable bootstrap extension in mesa and lib32-mesa PKGBUILD - Fixed 'IndexError: pop from empty list' error when building documentation with Sphinx 8.2.3 - Implemented solution based on issue sphinx-doc/sphinx#13407
1 parent ae2dfb0 commit 0012d9d

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

lib32-mesa/PKGBUILD

+15
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,21 @@ b2sums=('9a73a3321c9f1d7d4384779f647c43bcb536b316dcc9a61b8a78a6f4bfd4642366e4181
133133
prepare() {
134134
cd mesa-$_mesaver
135135

136+
# Downgrade Sphinx to version 8.1.3 for compatibility
137+
# pacman -Q python-sphinx &>/dev/null && sudo pacman -U --noconfirm https://archive.archlinux.org/packages/p/python-sphinx/python-sphinx-8.1.3-2-any.pkg.tar.zst || true
138+
139+
# 修复Sphinx 8.2.3兼容性问题:禁用bootstrap扩展
140+
if [ -f docs/conf.py ]; then
141+
# 备份原始文件
142+
cp docs/conf.py docs/conf.py.orig
143+
# 注释掉bootstrap扩展
144+
sed -i "s/'bootstrap',\?//g" docs/conf.py
145+
# 确保没有多余的逗号
146+
sed -i "s/,,/,/g" docs/conf.py
147+
sed -i "s/,]/]/g" docs/conf.py
148+
echo "Bootstrap extension disabled to fix Sphinx 8.2.3 compatibility issue."
149+
fi
150+
136151
local src
137152
for src in "${source[@]}"; do
138153
src="${src%%::*}"

mesa/PKGBUILD

+15
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,21 @@ b2sums=('9a73a3321c9f1d7d4384779f647c43bcb536b316dcc9a61b8a78a6f4bfd4642366e4181
138138
prepare() {
139139
cd mesa-$_mesaver
140140

141+
# Downgrade Sphinx to version 8.1.3 for compatibility
142+
# pacman -Q python-sphinx &>/dev/null && sudo pacman -U --noconfirm https://archive.archlinux.org/packages/p/python-sphinx/python-sphinx-8.1.3-2-any.pkg.tar.zst || true
143+
144+
# 修复Sphinx 8.2.3兼容性问题:禁用bootstrap扩展
145+
if [ -f docs/conf.py ]; then
146+
# 备份原始文件
147+
cp docs/conf.py docs/conf.py.orig
148+
# 注释掉bootstrap扩展
149+
sed -i "s/'bootstrap',\?//g" docs/conf.py
150+
# 确保没有多余的逗号
151+
sed -i "s/,,/,/g" docs/conf.py
152+
sed -i "s/,]/]/g" docs/conf.py
153+
echo "Bootstrap extension disabled to fix Sphinx 8.2.3 compatibility issue."
154+
fi
155+
141156
local src
142157
for src in "${source[@]}"; do
143158
src="${src%%::*}"

0 commit comments

Comments
 (0)