ci: Install a newer Python 3.10 for QtWebKit image

Starting with the upgrade to Hypothesis 6.103.4 we got hangs when pytest exits.
This is caused by:

https://github.com/HypothesisWorks/hypothesis/pull/4013

combined with:

https://github.com/python/cpython/issues/102126

which was fixed in Python 3.10.11, but the latest 3.10 packaged by Archlinux was
3.10.10.

Thus, we instead build a newer 3.10 from the AUR.
This bumps the build time up to about 20 minutes on my machine, which is
probably acceptable since those are nightly builds only anyways. We could
probably half that by disabling --enable-optimization, but that would be at the
cost of making the actual test runs (which run more often) slower.

Closes #8247
This commit is contained in:
Florian Bruhin 2024-06-29 20:47:59 +02:00
parent b78fc5765a
commit b241b0360b
1 changed files with 12 additions and 5 deletions

View File

@ -36,11 +36,14 @@ RUN pacman -Su --noconfirm \
libyaml \
xorg-xdpyinfo
RUN useradd user -u 1001 && \
mkdir /home/user && \
chown user:users /home/user
{% if not webengine %}
RUN pacman -U --noconfirm \
https://archive.archlinux.org/packages/q/qt5-webkit/qt5-webkit-5.212.0alpha4-18-x86_64.pkg.tar.zst \
https://archive.archlinux.org/packages/p/python-pyqt5/python-pyqt5-5.15.7-2-x86_64.pkg.tar.zst \
https://archive.archlinux.org/packages/p/python/python-3.10.10-1-x86_64.pkg.tar.zst \
https://archive.archlinux.org/packages/i/icu/icu-72.1-2-x86_64.pkg.tar.zst \
https://archive.archlinux.org/packages/l/libxml2/libxml2-2.10.4-4-x86_64.pkg.tar.zst \
https://archive.archlinux.org/packages/q/qt5-base/qt5-base-5.15.10%2Bkde%2Br129-3-x86_64.pkg.tar.zst \
@ -49,8 +52,15 @@ RUN pacman -U --noconfirm \
https://archive.archlinux.org/packages/q/qt5-sensors/qt5-sensors-5.15.10-1-x86_64.pkg.tar.zst \
https://archive.archlinux.org/packages/q/qt5-location/qt5-location-5.15.10%2Bkde%2Br5-1-x86_64.pkg.tar.zst \
https://archive.archlinux.org/packages/q/qt5-webchannel/qt5-webchannel-5.15.10%2Bkde%2Br3-1-x86_64.pkg.tar.zst
RUN pacman -S --noconfirm base-devel
RUN python3 -m ensurepip
RUN echo 'user ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers # needed for makepkg
USER user
RUN cd ~ && \
git clone https://aur.archlinux.org/python310.git && \
cd python310 && \
makepkg -si --noconfirm
USER root
RUN python3 -m pip install tox pyqt5-sip
{% endif %}
@ -65,9 +75,6 @@ RUN python3 -m pip install tox pyqt5-sip
RUN python3 -c "from {{ pyqt_module }} import QtWebKit, QtWebKitWidgets"
{% endif %}
RUN useradd user -u 1001 && \
mkdir /home/user && \
chown user:users /home/user
USER user
WORKDIR /home/user
RUN git config --global --add safe.directory /outside/.git