Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .cruft.json

This file was deleted.

41 changes: 15 additions & 26 deletions .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: |
python3 -m pip install build
python3 -m build --sdist
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v5
with:
path: "dist/*.tar.gz"
name: dist
Expand All @@ -37,33 +37,22 @@ jobs:
if: env.CAN_DEPLOY == 'true' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')

build_wheels:
name: Build wheels on ${{ matrix.os }}, arch ${{ matrix.arch }}
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: sdists_for_pypi
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
arch: x86_64
- os: ubuntu-latest
arch: i686
- os: macos-latest
arch: auto
- os: macos-14
arch: auto
os:
- ubuntu-latest
- macos-latest
- ubuntu-24.04-arm
- macos-15-intel
env:
# SPKGs to install as system packages
SPKGS: _bootstrap _prereq
SPKGS: _bootstrap _prereq gmp mpfr mpc
# Non-Python packages to install as spkgs
TARGETS_PRE: gmp mpfr mpc ppl-ensure
# Disable building PyPy wheels on all platforms
# Disable musllinux until #33083 provides alpine package information
CIBW_SKIP: "pp* *-musllinux*"
#
CIBW_ARCHS: ${{ matrix.arch }}
# https://cibuildwheel.readthedocs.io/en/stable/options/#requires-python
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9"
# Environment during wheel build
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"
# Use 'build', not 'pip wheel'
Expand All @@ -74,7 +63,7 @@ jobs:
repository: sagemath/sage
ref: develop

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v6
with:
name: dist
path: dist
Expand All @@ -84,7 +73,7 @@ jobs:
# Installing pipx follows the approach of https://github.com/pypa/cibuildwheel/pull/1743
id: python
with:
python-version: "3.8 - 3.12"
python-version: "3.12 - 3.14"
update-environment: false

- name: Build platform wheels
Expand All @@ -97,16 +86,16 @@ jobs:
run: |
"${{ steps.python.outputs.python-path }}" -m pip install pipx
export PATH=build/bin:$PATH
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"
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"
mkdir -p unpacked
for pkg in pplpy; do
(cd unpacked && tar xfz - ) < dist/$pkg*.tar.gz
"${{ steps.python.outputs.python-path }}" -m pipx run cibuildwheel==2.17.0 unpacked/$pkg*
"${{ steps.python.outputs.python-path }}" -m pipx run cibuildwheel==3.2.1 unpacked/$pkg*
done

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v5
with:
name: wheels
name: wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl

pypi-publish:
Expand All @@ -119,7 +108,7 @@ jobs:
CAN_DEPLOY: ${{ secrets.SAGEMATH_PYPI_API_TOKEN != '' }}
steps:

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v6
with:
name: wheels
path: wheelhouse
Expand Down
50 changes: 25 additions & 25 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,49 +11,49 @@ jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
cython: ["cython", "cython<3.0.0"]
exclude:
- python-version: 3.12
cython: cython<3.0.0
python: ["3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v2
with: { submodules: recursive }
- uses: conda-incubator/setup-miniconda@v2
with: { miniforge-variant: "Mambaforge", miniforge-version: "latest", python-version: "${{matrix.python-version}}" }
- name: Install pplpy dependencies
shell: bash -l {0}
run: |
mamba install --quiet setuptools cysignals ppl gmp mpfr mpc "${{matrix.cython}}"
- name: Install gmpy2 via mamba
shell: bash -l {0}
if: ${{ matrix.python-version != '3.12' }}
run: |
mamba install --quiet gmpy2
python -c 'import gmpy2; print(gmpy2.version())'
- name: Install gmpy2 via pip

- name: Setup Conda environment
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python }}
# Disabled for now due to
# https://github.com/conda-incubator/setup-miniconda/issues/379
# miniforge-version: latest
use-mamba: true
channels: conda-forge
channel-priority: true

- name: Install dependencies
shell: bash -l {0}
if: ${{ matrix.python-version == '3.12' }}
run: |
pip install --pre gmpy2==2.2.0a1
python -c 'import gmpy2; print(gmpy2.version())'
- name: Install pplpy
conda install --quiet ppl gmp mpfr mpc
- name: Build
shell: bash -l {0}
run: |
pip install --verbose --no-index --no-build-isolation .
pip install --verbose .
- name: Install test dependencies
run: |
mamba env update --quiet -n test -f environment.test.yml
conda env update --quiet -n test -f environment.test.yml
conda list
- name: Linter
- name: Lint
shell: bash -l {0}
run: |
cython-lint --ignore=E265,E266,E501,E741 --exclude='ppl_decl.pxd' ppl/
- name: Run tests
shell: bash -l {0}
run: |
python setup.py test
- name: Show logs
run: grep "" /dev/null `find -name '*.log'` || true
if: ${{ always() }}
21 changes: 0 additions & 21 deletions .gitlab-ci.yml

This file was deleted.

1 change: 1 addition & 0 deletions environment.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ channels:
dependencies:
- sphinx
- pip
- setuptools
- pip:
- linkchecker
- cython-lint
2 changes: 1 addition & 1 deletion ppl/mip_problem.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ cdef class MIP_Problem(object):
>>> m.optimal_value()
mpq(10,3)
>>> float(_)
3.333333333333333
3.3333333333333335
>>> m.optimizing_point()
point(10/3, 0/3)
"""
Expand Down
9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@ description = "Python PPL wrapper"
readme = "README.rst"
authors = [{name = "Vincent Delecroix", email = "vincent.delecroix@labri.fr"}]
license = {text = "GPL v3"}
requires-python = ">=3.12"
classifiers = [
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: C++",
"Programming Language :: Python",
"Development Status :: 5 - Production/Stable",
"Operating System :: Unix",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
keywords = [
"polyhedron",
Expand Down
9 changes: 0 additions & 9 deletions tox.ini

This file was deleted.

Loading