Skip to content

Commit 8abca18

Browse files
committed
Add and test minimum Cython/meson-python build requires
1 parent 3167e13 commit 8abca18

File tree

2 files changed

+46
-27
lines changed

2 files changed

+46
-27
lines changed

.github/workflows/buildwheel.yml

Lines changed: 44 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -138,40 +138,21 @@ jobs:
138138
- run: pip install .
139139
- run: python -m flint.test --verbose
140140

141-
# Test that we can still make a coverage build with setuptools.
142-
test_coverage_setuptools:
143-
name: Test coverage setuptools build
144-
runs-on: ubuntu-24.04
145-
steps:
146-
- uses: actions/checkout@v4
147-
- uses: actions/setup-python@v5
148-
with:
149-
python-version: '3.12'
150-
- run: sudo apt-get update
151-
- run: sudo apt-get install libflint-dev
152-
- run: pip install git+https://github.com/oscarbenjamin/cython.git@pr_relative_paths
153-
- run: pip install -r requirements-dev.txt
154-
- run: bin/coverage.sh
155-
156-
# Run SymPy test suite against python-flint master
157-
test_sympy:
158-
name: Test SymPy ${{ matrix.sympy-version }}
141+
# Test build with minimum Cython and meson-python versions.
142+
test_old_build_requires:
143+
name: 'Test old Cython/meson-python'
159144
runs-on: ubuntu-24.04
160-
strategy:
161-
fail-fast: false
162-
matrix:
163-
sympy-version: ['1.13.1']
164145
steps:
165146
- uses: actions/checkout@v4
166147
- uses: actions/setup-python@v5
167148
with:
168149
python-version: '3.12'
169150
- run: sudo apt-get update
170151
- run: sudo apt-get install libflint-dev
171-
- run: pip install .
172-
- run: pip install pytest pytest-xdist hypothesis
173-
- run: pip install sympy==${{ matrix.sympy-version }}
174-
- run: python -c 'import sympy; sympy.test(parallel=True)'
152+
# The versions here should be kept in sync with pyproject.toml.
153+
- run: 'pip install cython==3.0 meson-python==0.13'
154+
- run: pip install --no-build-isolation .
155+
- run: python -m flint.test --verbose
175156

176157
# For older Ubuntu we have to build Flint >= 3.0.0
177158
test_flint_releases:
@@ -209,6 +190,43 @@ jobs:
209190
- run: pip install --config-settings=setup-args="-Dflint_version_check=false" .
210191
- run: python -m flint.test --verbose
211192

193+
# Test that we can make a coverage build and report coverage
194+
test_coverage_setuptools:
195+
name: Test coverage setuptools build
196+
runs-on: ubuntu-24.04
197+
steps:
198+
- uses: actions/checkout@v4
199+
- uses: actions/setup-python@v5
200+
with:
201+
python-version: '3.12'
202+
- run: sudo apt-get update
203+
- run: sudo apt-get install libflint-dev
204+
# This is branch is for a Cython PR:
205+
# https://github.com/cython/cython/pull/6341
206+
- run: pip install git+https://github.com/oscarbenjamin/cython.git@pr_relative_paths
207+
- run: pip install -r requirements-dev.txt
208+
- run: bin/coverage.sh
209+
210+
# Run SymPy test suite against python-flint master
211+
test_sympy:
212+
name: Test SymPy ${{ matrix.sympy-version }}
213+
runs-on: ubuntu-24.04
214+
strategy:
215+
fail-fast: false
216+
matrix:
217+
sympy-version: ['1.13.1']
218+
steps:
219+
- uses: actions/checkout@v4
220+
- uses: actions/setup-python@v5
221+
with:
222+
python-version: '3.12'
223+
- run: sudo apt-get update
224+
- run: sudo apt-get install libflint-dev
225+
- run: pip install .
226+
- run: pip install pytest pytest-xdist hypothesis
227+
- run: pip install sympy==${{ matrix.sympy-version }}
228+
- run: python -c 'import sympy; sympy.test(parallel=True)'
229+
212230
# Deploy wheels and sdist to PyPI
213231

214232
pypi_release:

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[build-system]
2-
requires = ["meson-python", "cython"]
2+
# Minimum build requirements tested in CI need to be kept in sync with this.
3+
requires = ["meson-python>=0.13", "cython>=3.0"]
34
build-backend = "mesonpy"
45

56
[project]

0 commit comments

Comments
 (0)