Skip to content

Commit

Permalink
ci: Remove extra conditions for optional GUI dependencies
Browse files Browse the repository at this point in the history
We aren't testing on macOS 10.12 any more, but macos-latest, which is
now macOS 12. Wheels for Python 3.12 should be available everywhere by
now as well.

Only PySide2 remains conditional, as it is deprecated, but provides
universal wheels that install but don't work on Python 3.12.
  • Loading branch information
QuLogic committed Mar 19, 2024
1 parent 57233bb commit 53ad914
Showing 1 changed file with 18 additions and 27 deletions.
45 changes: 18 additions & 27 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ jobs:
# (sometimes, the install appears to be successful but shared
# libraries cannot be loaded at runtime, so an actual import is a
# better check).
# PyGObject, pycairo, and cariocffi do not install on macOS 10.12.
python -m pip install --upgrade pycairo 'cairocffi>=0.8' PyGObject &&
(
python -c 'import gi; gi.require_version("Gtk", "4.0"); from gi.repository import Gtk' &&
Expand All @@ -242,43 +241,35 @@ jobs:
echo 'PyGObject 3 is available' || echo 'PyGObject 3 is not available'
)
# There are no functioning wheels available for macOS 10.12 (as of
# Sept 2020) for either pyqt5 (there are only wheels for 10.13+) or
# pyside2 (the latest version (5.13.2) with 10.12 wheels has a
# fatal to us bug, it was fixed in 5.14.0 which has 10.13 wheels)
python -mpip install --upgrade pyqt5${{ matrix.pyqt5-ver }} &&
python -c 'import PyQt5.QtCore' &&
echo 'PyQt5 is available' ||
echo 'PyQt5 is not available'
if [[ "${{ runner.os }}" != 'macOS'
# Even though PySide2 wheels can be installed on Python 3.12, they are broken and since PySide2 is
# deprecated, they are unlikely to be fixed. For the same deprecation reason, there are no wheels
# on M1 macOS, so don't bother there either.
if [[ "${{ matrix.os }}" != 'macos-14'
&& "${{ matrix.python-version }}" != '3.12' ]]; then
python -mpip install --upgrade pyside2${{ matrix.pyside2-ver }} &&
python -c 'import PySide2.QtCore' &&
echo 'PySide2 is available' ||
echo 'PySide2 is not available'
fi
if [[ "${{ runner.os }}" != 'macOS' ]]; then
python -mpip install --upgrade pyqt6${{ matrix.pyqt6-ver }} &&
python -c 'import PyQt6.QtCore' &&
echo 'PyQt6 is available' ||
echo 'PyQt6 is not available'
fi
if [[ "${{ runner.os }}" != 'macOS'
&& "${{ matrix.python-version }}" != '3.12' ]]; then
python -mpip install --upgrade pyside6${{ matrix.pyside6-ver }} &&
python -c 'import PySide6.QtCore' &&
echo 'PySide6 is available' ||
echo 'PySide6 is not available'
fi
python -mpip install --upgrade pyqt6${{ matrix.pyqt6-ver }} &&
python -c 'import PyQt6.QtCore' &&
echo 'PyQt6 is available' ||
echo 'PyQt6 is not available'
python -mpip install --upgrade pyside6${{ matrix.pyside6-ver }} &&
python -c 'import PySide6.QtCore' &&
echo 'PySide6 is available' ||
echo 'PySide6 is not available'
if [[ "${{ matrix.python-version }}" != '3.12' ]]; then
python -mpip install --upgrade \
-f "https://extras.wxpython.org/wxPython4/extras/linux/gtk3/${{ matrix.os }}" \
wxPython &&
python -c 'import wx' &&
echo 'wxPython is available' ||
echo 'wxPython is not available'
fi
python -mpip install --upgrade \
-f "https://extras.wxpython.org/wxPython4/extras/linux/gtk3/${{ matrix.os }}" \
wxPython &&
python -c 'import wx' &&
echo 'wxPython is available' ||
echo 'wxPython is not available'
- name: Install the nightly dependencies
# Only install the nightly dependencies during the scheduled event
Expand Down

0 comments on commit 53ad914

Please sign in to comment.