Skip to content

Commit 40b3f9f

Browse files
committed
Update Python version requirements to >= 3.12, include Python 3.13 and 3.14 in CI and wheel building
1 parent 64bc0c1 commit 40b3f9f

File tree

8 files changed

+47
-98
lines changed

8 files changed

+47
-98
lines changed

.cruft.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/dist.yml

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
run: |
2525
python3 -m pip install build
2626
python3 -m build --sdist
27-
- uses: actions/upload-artifact@v3
27+
- uses: actions/upload-artifact@v5
2828
with:
2929
path: "dist/*.tar.gz"
3030
name: dist
@@ -37,33 +37,22 @@ jobs:
3737
if: env.CAN_DEPLOY == 'true' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
3838

3939
build_wheels:
40-
name: Build wheels on ${{ matrix.os }}, arch ${{ matrix.arch }}
40+
name: Build wheels on ${{ matrix.os }}
4141
runs-on: ${{ matrix.os }}
4242
needs: sdists_for_pypi
4343
strategy:
4444
fail-fast: false
4545
matrix:
46-
include:
47-
- os: ubuntu-latest
48-
arch: x86_64
49-
- os: ubuntu-latest
50-
arch: i686
51-
- os: macos-latest
52-
arch: auto
53-
- os: macos-14
54-
arch: auto
46+
os:
47+
- ubuntu-latest
48+
- macos-latest
49+
- ubuntu-24.04-arm
50+
- macos-15-intel
5551
env:
5652
# SPKGs to install as system packages
57-
SPKGS: _bootstrap _prereq
53+
SPKGS: _bootstrap _prereq gmp mpfr mpc
5854
# Non-Python packages to install as spkgs
5955
TARGETS_PRE: gmp mpfr mpc ppl-ensure
60-
# Disable building PyPy wheels on all platforms
61-
# Disable musllinux until #33083 provides alpine package information
62-
CIBW_SKIP: "pp* *-musllinux*"
63-
#
64-
CIBW_ARCHS: ${{ matrix.arch }}
65-
# https://cibuildwheel.readthedocs.io/en/stable/options/#requires-python
66-
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9"
6756
# Environment during wheel build
6857
CIBW_ENVIRONMENT: "PATH=$(pwd)/local/bin:$PATH CPATH=$(pwd)/local/include:$CPATH LIBRARY_PATH=$(pwd)/local/lib:$LIBRARY_PATH LD_LIBRARY_PATH=$(pwd)/local/lib:$LD_LIBRARY_PATH PKG_CONFIG_PATH=$(pwd)/local/share/pkgconfig:$PKG_CONFIG_PATH ACLOCAL_PATH=/usr/share/aclocal"
6958
# Use 'build', not 'pip wheel'
@@ -74,7 +63,7 @@ jobs:
7463
repository: sagemath/sage
7564
ref: develop
7665

77-
- uses: actions/download-artifact@v3
66+
- uses: actions/download-artifact@v6
7867
with:
7968
name: dist
8069
path: dist
@@ -84,7 +73,7 @@ jobs:
8473
# Installing pipx follows the approach of https://github.com/pypa/cibuildwheel/pull/1743
8574
id: python
8675
with:
87-
python-version: "3.8 - 3.12"
76+
python-version: "3.12 - 3.14"
8877
update-environment: false
8978

9079
- name: Build platform wheels
@@ -97,16 +86,16 @@ jobs:
9786
run: |
9887
"${{ steps.python.outputs.python-path }}" -m pip install pipx
9988
export PATH=build/bin:$PATH
100-
export CIBW_BEFORE_ALL="( $(sage-print-system-package-command debian --yes --no-install-recommends install $(sage-get-system-packages debian $SPKGS)) || $(sage-print-system-package-command fedora --yes --no-install-recommends install $(sage-get-system-packages fedora $SPKGS | sed s/pkg-config/pkgconfig/)) || ( $(sage-print-system-package-command homebrew --yes --no-install-recommends install $(sage-get-system-packages homebrew $SPKGS)) || echo error ignored) ) && ./bootstrap && ./configure --enable-build-as-root --enable-fat-binary && MAKE=\"make -j6\" make V=0 $TARGETS_PRE"
89+
export CIBW_BEFORE_ALL="( $(sage-print-system-package-command debian --yes --no-install-recommends install $(sage-get-system-packages debian $SPKGS)) || $(sage-print-system-package-command fedora --yes --no-install-recommends install $(sage-get-system-packages fedora $SPKGS | sed s/pkg-config/pkgconfig/)) || ( $(sage-print-system-package-command homebrew --yes --no-install-recommends install $(sage-get-system-packages homebrew $SPKGS)) || $(sage-print-system-package-command alpine --yes --no-install-recommends install $(sage-get-system-packages alpine $SPKGS)) || echo error ignored) ) && ./bootstrap && ./configure --enable-build-as-root --enable-fat-binary --disable-meson-check --disable-boost && MAKE=\"make -j6\" make V=0 $TARGETS_PRE"
10190
mkdir -p unpacked
10291
for pkg in pplpy; do
10392
(cd unpacked && tar xfz - ) < dist/$pkg*.tar.gz
104-
"${{ steps.python.outputs.python-path }}" -m pipx run cibuildwheel==2.17.0 unpacked/$pkg*
93+
"${{ steps.python.outputs.python-path }}" -m pipx run cibuildwheel==3.2.1 unpacked/$pkg*
10594
done
10695
107-
- uses: actions/upload-artifact@v3
96+
- uses: actions/upload-artifact@v5
10897
with:
109-
name: wheels
98+
name: wheels-${{ matrix.os }}
11099
path: ./wheelhouse/*.whl
111100

112101
pypi-publish:
@@ -119,7 +108,7 @@ jobs:
119108
CAN_DEPLOY: ${{ secrets.SAGEMATH_PYPI_API_TOKEN != '' }}
120109
steps:
121110

122-
- uses: actions/download-artifact@v3
111+
- uses: actions/download-artifact@v6
123112
with:
124113
name: wheels
125114
path: wheelhouse

.github/workflows/test.yml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,49 +11,49 @@ jobs:
1111
test:
1212
runs-on: ubuntu-latest
1313
strategy:
14+
fail-fast: false
1415
matrix:
15-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
16-
cython: ["cython", "cython<3.0.0"]
17-
exclude:
18-
- python-version: 3.12
19-
cython: cython<3.0.0
16+
python: ["3.12", "3.13", "3.14"]
2017
steps:
2118
- uses: actions/checkout@v2
2219
with: { submodules: recursive }
23-
- uses: conda-incubator/setup-miniconda@v2
24-
with: { miniforge-variant: "Mambaforge", miniforge-version: "latest", python-version: "${{matrix.python-version}}" }
25-
- name: Install pplpy dependencies
26-
shell: bash -l {0}
27-
run: |
28-
mamba install --quiet setuptools cysignals ppl gmp mpfr mpc "${{matrix.cython}}"
29-
- name: Install gmpy2 via mamba
30-
shell: bash -l {0}
31-
if: ${{ matrix.python-version != '3.12' }}
32-
run: |
33-
mamba install --quiet gmpy2
34-
python -c 'import gmpy2; print(gmpy2.version())'
35-
- name: Install gmpy2 via pip
20+
21+
- name: Setup Conda environment
22+
uses: conda-incubator/setup-miniconda@v3
23+
with:
24+
python-version: ${{ matrix.python }}
25+
# Disabled for now due to
26+
# https://github.com/conda-incubator/setup-miniconda/issues/379
27+
# miniforge-version: latest
28+
use-mamba: true
29+
channels: conda-forge
30+
channel-priority: true
31+
32+
- name: Install dependencies
3633
shell: bash -l {0}
37-
if: ${{ matrix.python-version == '3.12' }}
3834
run: |
39-
pip install --pre gmpy2==2.2.0a1
40-
python -c 'import gmpy2; print(gmpy2.version())'
41-
- name: Install pplpy
35+
conda install --quiet ppl gmp mpfr mpc
36+
37+
- name: Build
4238
shell: bash -l {0}
4339
run: |
44-
pip install --verbose --no-index --no-build-isolation .
40+
pip install --verbose .
41+
4542
- name: Install test dependencies
4643
run: |
47-
mamba env update --quiet -n test -f environment.test.yml
44+
conda env update --quiet -n test -f environment.test.yml
4845
conda list
49-
- name: Linter
46+
47+
- name: Lint
5048
shell: bash -l {0}
5149
run: |
5250
cython-lint --ignore=E265,E266,E501,E741 --exclude='ppl_decl.pxd' ppl/
51+
5352
- name: Run tests
5453
shell: bash -l {0}
5554
run: |
5655
python setup.py test
56+
5757
- name: Show logs
5858
run: grep "" /dev/null `find -name '*.log'` || true
5959
if: ${{ always() }}

.gitlab-ci.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

environment.test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ channels:
55
dependencies:
66
- sphinx
77
- pip
8+
- setuptools
89
- pip:
910
- linkchecker
1011
- cython-lint

ppl/mip_problem.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ cdef class MIP_Problem(object):
7272
>>> m.optimal_value()
7373
mpq(10,3)
7474
>>> float(_)
75-
3.333333333333333
75+
3.3333333333333335
7676
>>> m.optimizing_point()
7777
point(10/3, 0/3)
7878
"""

pyproject.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,19 @@ description = "Python PPL wrapper"
1313
readme = "README.rst"
1414
authors = [{name = "Vincent Delecroix", email = "vincent.delecroix@labri.fr"}]
1515
license = {text = "GPL v3"}
16+
requires-python = ">=3.12"
1617
classifiers = [
1718
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
1819
"Programming Language :: C++",
1920
"Programming Language :: Python",
2021
"Development Status :: 5 - Production/Stable",
2122
"Operating System :: Unix",
2223
"Intended Audience :: Science/Research",
23-
"Programming Language :: Python :: 3.8",
24-
"Programming Language :: Python :: 3.9",
25-
"Programming Language :: Python :: 3.10",
26-
"Programming Language :: Python :: 3.11",
24+
"Programming Language :: Python :: 3",
25+
"Programming Language :: Python :: 3 :: Only",
2726
"Programming Language :: Python :: 3.12",
27+
"Programming Language :: Python :: 3.13",
28+
"Programming Language :: Python :: 3.14",
2829
]
2930
keywords = [
3031
"polyhedron",

tox.ini

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)