Skip to content

Commit 5b94c3b

Browse files
committed
Update CI for Meson build
1 parent dc8fdc9 commit 5b94c3b

File tree

8 files changed

+30
-44
lines changed

8 files changed

+30
-44
lines changed

.appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ install:
7070
test_script:
7171
# Now build the thing..
7272
- set LINK=/LIBPATH:%cd%\lib
73-
- pip install -ve .
73+
- pip install -v --no-build-isolation --editable --config-settings=setup-args="--vsenv" .
7474
# this should show no freetype dll...
7575
- set "DUMPBIN=%VS140COMNTOOLS%\..\..\VC\bin\dumpbin.exe"
7676
- '"%DUMPBIN%" /DEPENDENTS lib\matplotlib\ft2font*.pyd | findstr freetype.*.dll && exit /b 1 || exit /b 0'

.circleci/config.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ commands:
4848
ffmpeg \
4949
dvipng \
5050
lmodern \
51+
ninja-build \
5152
cm-super \
5253
texlive-latex-base \
5354
texlive-latex-extra \
@@ -97,6 +98,7 @@ commands:
9798
- run:
9899
name: Install Python dependencies
99100
command: |
101+
python -m pip install --user meson-python pybind11
100102
python -m pip install --user \
101103
numpy<< parameters.numpy_version >> \
102104
-r requirements/doc/doc-requirements.txt
@@ -114,7 +116,7 @@ commands:
114116
version=${version#v}
115117
python -m pip install matplotlib==${version}
116118
else
117-
python -m pip install --user -ve .
119+
python -m pip install --user -v --no-build-isolation --editable .
118120
fi
119121
- save_cache:
120122
key: build-deps-2
@@ -215,8 +217,8 @@ jobs:
215217
- fonts-install
216218
- pip-install
217219

218-
- mpl-install
219220
- doc-deps-install
221+
- mpl-install
220222

221223
- doc-build
222224
- doc-show-errors-warnings

.github/workflows/codeql-analysis.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ jobs:
4141
# dependencies so we don't need another copy here.
4242
# https://github.com/jazzband/pip-tools/pull/1681
4343
python -m pip install --upgrade \
44-
certifi contourpy cycler fonttools kiwisolver importlib_resources \
45-
numpy packaging pillow pyparsing python-dateutil setuptools-scm \
46-
pybind11
44+
build certifi contourpy cycler fonttools kiwisolver \
45+
importlib_resources meson-python numpy packaging pillow pybind11 \
46+
pyparsing python-dateutil setuptools-scm
4747
echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV
4848
4949
- name: Initialize CodeQL
@@ -56,7 +56,7 @@ jobs:
5656
if: matrix.language == 'cpp'
5757
run: |
5858
mkdir ~/.cache/matplotlib
59-
$CODEQL_PYTHON setup.py build
59+
$CODEQL_PYTHON -m build
6060
6161
- name: Perform CodeQL Analysis
6262
uses: github/codeql-action/analyze@v2

.github/workflows/cygwin.yml

+3-10
Original file line numberDiff line numberDiff line change
@@ -205,18 +205,11 @@ jobs:
205205
run: |
206206
ccache -s
207207
git describe
208-
cat <<EOT >> mplsetup.cfg
209-
[rc_options]
210-
backend=Agg
211-
212-
[libs]
213-
system_freetype = False
214-
system_qhull = True
215-
EOT
216-
cat mplsetup.cfg
217208
# All dependencies must have been pre-installed, so that the minver
218209
# constraints are held.
219-
python -m pip install --no-deps -ve .
210+
python -m pip install --no-deps --no-build-isolation -v \
211+
--config-settings=setup-args="-DrcParams-backend=Agg -Dsystem-freetype=false -Dsystem-qhull=true" \
212+
--editable .
220213
221214
- name: Find DLLs to rebase
222215
shell: bash.exe -eo pipefail -o igncr "{0}"

.github/workflows/mypy-stubtest.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ jobs:
2222
run: |
2323
pip3 install -r requirements/testing/mypy.txt \
2424
-r requirements/testing/all.txt
25-
pip3 install -e .
25+
pip3 install meson-python ninja pybind11
26+
pip3 install --no-build-isolation --editable .
2627
2728
- name: Set up reviewdog
2829
run: |

.github/workflows/tests.yml

+7-21
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ jobs:
5656
pyside2-ver: '==5.15.1' # oldest version with working Py3.9 wheel.
5757
pyside6-ver: '==6.0.0'
5858
delete-font-cache: true
59-
no-build-isolation: true
6059
- os: ubuntu-20.04
6160
python-version: 3.9
6261
extra-requirements: '-r requirements/testing/extra.txt'
@@ -81,7 +80,6 @@ jobs:
8180
python-version: '3.12-dev'
8281
pyside6-ver: '!=6.5.1'
8382
pre: true
84-
no-build-isolation: true
8583
- os: macos-latest
8684
python-version: 3.9
8785
# https://bugreports.qt.io/projects/PYSIDE/issues/PYSIDE-2346
@@ -131,6 +129,7 @@ jobs:
131129
libxcb-render-util0 \
132130
libxcb-xinerama0 \
133131
lmodern \
132+
ninja-build \
134133
pkg-config \
135134
qtbase5-dev \
136135
texlive-fonts-recommended \
@@ -150,7 +149,7 @@ jobs:
150149
macOS)
151150
brew install ccache
152151
brew tap homebrew/cask-fonts
153-
brew install font-noto-sans-cjk gobject-introspection gtk4
152+
brew install font-noto-sans-cjk gobject-introspection gtk4 ninja
154153
;;
155154
esac
156155
@@ -211,10 +210,8 @@ jobs:
211210
-r requirements/testing/all.txt \
212211
${{ matrix.extra-requirements }}
213212
214-
# Preinstall pybind11 on no-build-isolation builds.
215-
if [[ "${{ matrix.no-build-isolation }}" == 'true' ]]; then
216-
python -m pip install 'pybind11>=2.6'
217-
fi
213+
# Preinstall build requirements to enable no-build-isolation builds.
214+
python -m pip install 'meson-python>=0.13.1' 'pybind11>=2.6'
218215
219216
# Install optional dependencies from PyPI.
220217
# Sphinx is needed to run sphinxext tests
@@ -300,20 +297,9 @@ jobs:
300297
fi
301298
fi
302299
303-
cat <<EOT >> mplsetup.cfg
304-
[rc_options]
305-
backend=Agg
306-
EOT
307-
308-
cat mplsetup.cfg
309-
310-
if [[ "${{ matrix.no-build-isolation }}" == 'true' ]]; then
311-
# Minimum versions run does not use build isolation so that it
312-
# builds against the pre-installed minver dependencies.
313-
python -m pip install --no-deps --no-build-isolation -ve .
314-
else
315-
python -m pip install --no-deps -ve .
316-
fi
300+
python -m pip install --no-deps --no-build-isolation -v \
301+
--config-settings=setup-args="-DrcParams-backend=Agg" \
302+
--editable .
317303
318304
if [[ "${{ runner.os }}" != 'macOS' ]]; then
319305
unset CPPFLAGS

azure-pipelines.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ stages:
9696
cm-super \
9797
dvipng \
9898
ffmpeg \
99+
fonts-freefont-otf \
99100
fonts-noto-cjk \
100101
fonts-wqy-zenhei \
101102
gdb \
@@ -105,23 +106,24 @@ stages:
105106
libcairo2 \
106107
libgirepository-1.0-1 \
107108
lmodern \
108-
fonts-freefont-otf \
109+
ninja-build \
109110
poppler-utils \
110-
texlive-pictures \
111111
texlive-fonts-recommended \
112112
texlive-latex-base \
113113
texlive-latex-extra \
114114
texlive-latex-recommended \
115115
texlive-luatex \
116+
texlive-pictures \
116117
texlive-xetex
117118
;;
118119
darwin)
119120
brew install --cask xquartz
120-
brew install pkg-config ffmpeg imagemagick mplayer ccache
121+
brew install ccache ffmpeg imagemagick mplayer ninja pkg-config
121122
brew tap homebrew/cask-fonts
122123
brew install font-noto-sans-cjk-sc
123124
;;
124125
win32)
126+
choco install ninja
125127
;;
126128
*)
127129
exit 1
@@ -131,12 +133,13 @@ stages:
131133
132134
- bash: |
133135
python -m pip install --upgrade pip
136+
python -m pip install --upgrade meson-python pybind11
134137
python -m pip install -r requirements/testing/all.txt -r requirements/testing/extra.txt ||
135138
[[ "$PYTHON_VERSION" = 'Pre' ]]
136139
displayName: 'Install dependencies with pip'
137140
138141
- bash: |
139-
python -m pip install -ve . ||
142+
python -m pip install -v --no-build-isolation --editable . ||
140143
[[ "$PYTHON_VERSION" = 'Pre' ]]
141144
displayName: "Install self"
142145

environment.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@ dependencies:
1515
- fonttools>=4.22.0
1616
- importlib-resources>=3.2.0
1717
- kiwisolver>=1.0.1
18+
- meson-python>=0.13.1
1819
- numpy>=1.21
1920
- pillow>=6.2
21+
- pkg-config
2022
- pybind11>=2.6.0
2123
- pygobject
2224
- pyparsing>=2.3.1
2325
- pyqt
2426
- python-dateutil>=2.1
25-
- setuptools
2627
- setuptools_scm
2728
- wxpython
2829
# building documentation

0 commit comments

Comments
 (0)