Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b5bc3a9

Browse files
committed
Always use PyQT/PySide6 for GitHub CI
1 parent 6471d4c commit b5bc3a9

File tree

3 files changed

+38
-27
lines changed

3 files changed

+38
-27
lines changed

.github/workflows/tests.yml

Lines changed: 35 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
extra-requirements: '-r requirements/testing/extra.txt'
5151
- os: macos-latest
5252
python-version: 3.8
53+
extra-requirements: '-r requirements/testing/extra.txt'
5354

5455
steps:
5556
- uses: actions/checkout@v3
@@ -110,6 +111,7 @@ jobs:
110111
brew install ccache
111112
brew tap homebrew/cask-fonts
112113
brew install font-noto-sans-cjk
114+
brew install --cask inkscape
113115
;;
114116
esac
115117
@@ -172,43 +174,50 @@ jobs:
172174
# (sometimes, the install appears to be successful but shared
173175
# libraries cannot be loaded at runtime, so an actual import is a
174176
# better check).
175-
# PyGObject, pycairo, and cariocffi do not install on OSX 10.12.
176-
python -m pip install --upgrade pycairo 'cairocffi>=0.8' PyGObject &&
177+
python -m pip install --upgrade pycairo 'cairocffi>=0.8' &&
178+
echo 'Cairo is available' ||
179+
echo 'Cairo is not available'
180+
181+
# PyGObject does not install on OSX 11.6.
182+
python -m pip install --upgrade PyGObject &&
177183
python -c 'import gi; gi.require_version("Gtk", "3.0"); from gi.repository import Gtk' &&
178184
echo 'PyGObject is available' ||
179185
echo 'PyGObject is not available'
180186
181-
# There are no functioning wheels available for OSX 10.12 (as of
182-
# Sept 2020) for either pyqt5 (there are only wheels for 10.13+) or
183-
# pyside2 (the latest version (5.13.2) with 10.12 wheels has a
184-
# fatal to us bug, it was fixed in 5.14.0 which has 10.13 wheels)
185187
python -mpip install --upgrade pyqt5${{ matrix.pyqt5-ver }} &&
186188
python -c 'import PyQt5.QtCore' &&
187189
echo 'PyQt5 is available' ||
188190
echo 'PyQt5 is not available'
191+
python -mpip install --upgrade pyqt6 &&
192+
python -c 'import PyQt6.QtCore' &&
193+
echo 'PyQt6 is available' ||
194+
echo 'PyQt6 is not available'
195+
python -mpip install --upgrade pyside2 &&
196+
python -c 'import PySide2.QtCore' &&
197+
echo 'PySide2 is available' ||
198+
echo 'PySide2 is not available'
199+
python -mpip install --upgrade pyside6 &&
200+
python -c 'import PySide6.QtCore' &&
201+
echo 'PySide6 is available' ||
202+
echo 'PySide6 is not available'
203+
204+
# No linux wheels in pypi
189205
if [[ "${{ runner.os }}" != 'macOS' ]]; then
190-
python -mpip install --upgrade pyside2 &&
191-
python -c 'import PySide2.QtCore' &&
192-
echo 'PySide2 is available' ||
193-
echo 'PySide2 is not available'
194-
fi
195-
if [[ "${{ matrix.os }}" = ubuntu-20.04 ]]; then
196-
python -mpip install --upgrade pyqt6 &&
197-
python -c 'import PyQt6.QtCore' &&
198-
echo 'PyQt6 is available' ||
199-
echo 'PyQt6 is not available'
200-
python -mpip install --upgrade pyside6 &&
201-
python -c 'import PySide6.QtCore' &&
202-
echo 'PySide6 is available' ||
203-
echo 'PySide6 is not available'
206+
python -mpip install --upgrade \
207+
-f "https://extras.wxpython.org/wxPython4/extras/linux/gtk3/${{ matrix.os }}" \
208+
wxPython &&
209+
python -c 'import wx' &&
210+
echo 'wxPython is available' ||
211+
echo 'wxPython is not available'
204212
fi
205213
206-
python -mpip install --upgrade \
207-
-f "https://extras.wxpython.org/wxPython4/extras/linux/gtk3/${{ matrix.os }}" \
208-
wxPython &&
209-
python -c 'import wx' &&
210-
echo 'wxPython is available' ||
211-
echo 'wxPython is not available'
214+
# But wheels for OSX
215+
if [[ "${{ runner.os }}" == 'macOS' ]]; then
216+
python -mpip install --upgrade wxPython &&
217+
python -c 'import wx' &&
218+
echo 'wxPython is available' ||
219+
echo 'wxPython is not available'
220+
fi
212221
213222
- name: Install the nightly dependencies
214223
# Only install the nightly dependencies during the scheduled event

lib/matplotlib/testing/_markers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ def _checkdep_usetex():
4646
reason='xelatex + pgf is required')
4747
needs_usetex = pytest.mark.skipif(
4848
not _checkdep_usetex(),
49-
reason="This test needs a TeX installation")
49+
reason="This test needs a TeX installation with dvipng and ghostscript")

lib/matplotlib/tests/test_backend_svg.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import datetime
22
from io import BytesIO
33
from pathlib import Path
4+
import sys
45
import xml.etree.ElementTree
56
import xml.parsers.expat
67

@@ -74,6 +75,7 @@ def test_bold_font_output():
7475
ax.set_title('bold-title', fontweight='bold')
7576

7677

78+
@pytest.mark.xfail(sys.platform == "darwin", reason='Fails on OSX')
7779
@image_comparison(['bold_font_output_with_none_fonttype.svg'])
7880
def test_bold_font_output_with_none_fonttype():
7981
plt.rcParams['svg.fonttype'] = 'none'

0 commit comments

Comments
 (0)