Skip to content

Commit 8834263

Browse files
committed
Merge branch 'master' into fmpz_mpoly
2 parents e3c81d8 + 1ce152d commit 8834263

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+5320
-485
lines changed

.cirrus.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ cirrus_wheels_macos_arm64_task:
1515
- which python
1616
- python --version
1717
install_cibuildwheel_script:
18-
- python -m pip install cibuildwheel==2.11.4
18+
- python -m pip install cibuildwheel==2.16.2
1919
run_cibuildwheel_script:
2020
- bin/cibw.sh
2121
wheels_artifacts:

.github/dependabot.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: github-actions
9+
directory: "/"
10+
schedule:
11+
interval: "monthly"

.github/workflows/buildwheel.yml

+66-46
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
os: [ubuntu-20.04, windows-2019, macos-12]
1414

1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717

18-
- uses: actions/setup-python@v4
18+
- uses: actions/setup-python@v5
1919
with:
2020
python-version: '3.10'
2121

@@ -32,50 +32,58 @@ jobs:
3232
if: ${{ matrix.os == 'windows-2019' }}
3333

3434
- name: Build wheels
35-
uses: pypa/cibuildwheel@v2.11.2
35+
uses: pypa/cibuildwheel@v2.16.5
3636
env:
37-
CIBW_BUILD: cp39-* cp310-* cp311-*
38-
CIBW_SKIP: "*-win32 *-manylinux_i686 *-musllinux_*"
39-
#CIBW_SKIP: "*-win32 *-musllinux_*"
40-
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
41-
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
42-
CIBW_BEFORE_ALL_LINUX: bin/cibw_before_all_linux.sh
43-
CIBW_BEFORE_ALL_MACOS: bin/cibw_before_all_macosx_x86_64.sh
37+
# override setting in pyproject.toml to use msys2 instead of msys64 bash
4438
CIBW_BEFORE_ALL_WINDOWS: msys2 -c bin/cibw_before_all_windows.sh
45-
CIBW_BEFORE_BUILD_WINDOWS: msys2 -c bin/cibw_before_build_windows.sh
46-
CIBW_BEFORE_BUILD: pip install numpy cython==3.0.0b2 delvewheel
47-
CIBW_ENVIRONMENT: >
48-
C_INCLUDE_PATH=$(pwd)/.local/include/
49-
LIBRARY_PATH=$(pwd)/.local/lib/
50-
LD_LIBRARY_PATH=$(pwd)/.local/lib:$LD_LIBRARY_PATH
51-
PYTHON_FLINT_MINGW64=true
52-
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: >-
53-
bin\cibw_repair_wheel_command_windows.bat {dest_dir} {wheel}
54-
CIBW_TEST_COMMAND: python -c "import flint; print(str(flint.fmpz(2)))"
55-
56-
- uses: actions/upload-artifact@v3
39+
CIBW_BEFORE_BUILD_WINDOWS: pip install delvewheel && msys2 -c bin/cibw_before_build_windows.sh
40+
41+
- uses: actions/upload-artifact@v4
5742
with:
43+
name: wheels-${{ matrix.os }}
5844
path: wheelhouse/*.whl
5945

6046
build_sdist:
6147
name: Build sdist
6248
runs-on: ubuntu-20.04
6349

6450
steps:
65-
- uses: actions/checkout@v3
51+
- uses: actions/checkout@v4
6652

67-
- uses: actions/setup-python@v4
53+
- uses: actions/setup-python@v5
6854
with:
69-
python-version: '3.11'
55+
python-version: '3.12'
7056

71-
- run: pip install --upgrade pip
72-
- run: pip install cython numpy
73-
- run: python setup.py sdist
57+
- run: pip install build
58+
- run: python -m build --sdist
7459

75-
- uses: actions/upload-artifact@v3
60+
- uses: actions/upload-artifact@v4
7661
with:
62+
name: sdist
7763
path: dist/*.tar.gz
7864

65+
test_rst:
66+
needs: build_wheels
67+
name: Test rst docs
68+
runs-on: ubuntu-20.04
69+
70+
steps:
71+
- uses: actions/checkout@v4
72+
73+
- uses: actions/setup-python@v5
74+
with:
75+
python-version: '3.12'
76+
77+
- uses: actions/download-artifact@v4
78+
with:
79+
name: wheels-ubuntu-20.04
80+
path: wheelhouse
81+
82+
- run: pip install --upgrade pip
83+
- run: pip install pytest
84+
- run: pip install --no-index --find-links wheelhouse python_flint
85+
- run: pytest --doctest-glob='*.rst' doc/source
86+
7987
test_wheels:
8088
needs: build_wheels
8189
name: Test ${{ matrix.python-version }} wheel on ${{ matrix.os }}
@@ -84,37 +92,49 @@ jobs:
8492
fail-fast: false
8593
matrix:
8694
os: [ubuntu-20.04, windows-2019, macos-12]
87-
python-version: ['3.9', '3.10', '3.11']
95+
python-version: ['3.9', '3.10', '3.11', '3.12']
8896

8997
steps:
90-
- uses: actions/setup-python@v4
98+
- uses: actions/setup-python@v5
9199
with:
92100
python-version: ${{ matrix.python-version }}
93-
- uses: actions/download-artifact@v3
101+
- uses: actions/download-artifact@v4
94102
with:
95-
name: artifact
103+
name: wheels-${{ matrix.os }}
96104
path: wheelhouse
97-
- run: pip install --find-links wheelhouse python_flint
105+
- run: pip install --no-index --find-links wheelhouse python_flint
98106
- run: python -m flint.test --verbose
99107

100-
test_pip_linux_vcs:
101-
name: Install from git checkout on Ubuntu
108+
test_pip_vcs_sdist:
109+
name: pip install ${{ matrix.target }} on ${{ matrix.python-version }}
102110
runs-on: ubuntu-22.04
111+
strategy:
112+
fail-fast: false
113+
matrix:
114+
python-version: ['3.11', '3.12', '3.13-dev']
115+
# '.' means install from python-flint git checkout
116+
# 'python-flint' means install from PyPI sdist
117+
target: ['.', 'python-flint']
103118
steps:
104-
- uses: actions/checkout@v3
105-
- uses: actions/setup-python@v4
119+
- uses: actions/checkout@v4
120+
- uses: actions/setup-python@v5
106121
with:
107-
python-version: 3.11
108-
- run: bin/pip_install_ubuntu.sh . # Install from checkout
122+
python-version: ${{ matrix.python-version }}
123+
- run: bin/pip_install_ubuntu.sh ${{ matrix.target }}
109124
- run: python -m flint.test --verbose
110125

111-
test_pip_linux_pypi:
112-
name: Install from PyPI sdist on Ubuntu
126+
test_flint_versions:
127+
name: Test flint ${{ matrix.flinttag }}
113128
runs-on: ubuntu-22.04
129+
strategy:
130+
fail-fast: false
131+
matrix:
132+
# Supported versions and latest git
133+
flinttag: ['v3.0.0', 'v3.0.1', 'v3.1.0', 'main']
114134
steps:
115-
- uses: actions/checkout@v3
116-
- uses: actions/setup-python@v4
135+
- uses: actions/checkout@v4
136+
- uses: actions/setup-python@v5
117137
with:
118-
python-version: 3.11
119-
- run: bin/pip_install_ubuntu.sh python-flint # Install from PyPI sdist
138+
python-version: 3.12
139+
- run: bin/pip_install_ubuntu.sh . ${{ matrix.flinttag }}
120140
- run: python -m flint.test --verbose

.github/workflows/ci-sage.yml

+112
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
name: Run Sage CI
2+
3+
## This GitHub Actions workflow provides:
4+
##
5+
## - portability testing, by building and testing this project on many platforms
6+
## (Linux variants and Cygwin), each with two configurations (installed packages),
7+
##
8+
## - continuous integration, by building and testing other software
9+
## that depends on this project.
10+
##
11+
## The testing can be monitored in the "Actions" tab of the GitHub repository.
12+
##
13+
## After all jobs have finished (or are canceled) and a short delay,
14+
## tar files of all logs are made available as "build artifacts".
15+
##
16+
## This GitHub Actions workflow uses the portability testing framework
17+
## of SageMath (https://www.sagemath.org/). For more information, see
18+
## https://doc.sagemath.org/html/en/developer/portability_testing.html
19+
20+
## The workflow consists of two jobs:
21+
##
22+
## - First, it builds a source distribution of the project
23+
## and generates a script "update-pkgs.sh". It uploads them
24+
## as a build artifact named upstream.
25+
##
26+
## - Second, it checks out a copy of the SageMath source tree.
27+
## It downloads the upstream artifact and replaces the project's
28+
## package in the SageMath distribution by the newly packaged one
29+
## from the upstream artifact, by running the script "update-pkgs.sh".
30+
## Then it builds a small portion of the Sage distribution.
31+
##
32+
## Many copies of the second step are run in parallel for each of the tested
33+
## systems/configurations.
34+
35+
on:
36+
push:
37+
tags:
38+
- '*'
39+
schedule:
40+
# run each Wednesday at 01:00
41+
- cron: '0 1 * * 3'
42+
workflow_dispatch:
43+
# Allow to run manually
44+
45+
env:
46+
# Ubuntu packages to install so that the project's "make dist" can succeed
47+
DIST_PREREQ:
48+
# Name of this project in the Sage distribution
49+
SPKG: python_flint
50+
# Standard setting: Test the current beta release of Sage:
51+
REMOVE_PATCHES: "*"
52+
53+
jobs:
54+
55+
dist:
56+
runs-on: ubuntu-latest
57+
steps:
58+
- name: Check out ${{ env.SPKG }}
59+
uses: actions/checkout@v4
60+
with:
61+
path: build/pkgs/${{ env.SPKG }}/src
62+
- name: Install prerequisites
63+
run: |
64+
sudo DEBIAN_FRONTEND=noninteractive apt-get update
65+
sudo DEBIAN_FRONTEND=noninteractive apt-get install $DIST_PREREQ
66+
if: env.DIST_PREREQ != ''
67+
- uses: actions/setup-python@v5
68+
with:
69+
python-version: '3.10'
70+
- run: pip install build
71+
- name: Run make dist, prepare upstream artifact
72+
run: |
73+
(cd build/pkgs/${{ env.SPKG }}/src && python -m build --sdist) \
74+
&& mkdir -p upstream && cp build/pkgs/${{ env.SPKG }}/src/dist/*.tar.gz upstream/${{ env.SPKG }}-git.tar.gz \
75+
&& echo "sage-package create ${{ env.SPKG }} --version git --tarball ${{ env.SPKG }}-git.tar.gz --type=standard" > upstream/update-pkgs.sh \
76+
&& if [ -n "${{ env.REMOVE_PATCHES }}" ]; then echo "(cd ../build/pkgs/${{ env.SPKG }}/patches && rm -f ${{ env.REMOVE_PATCHES }}; :)" >> upstream/update-pkgs.sh; fi \
77+
&& ls -l upstream/
78+
- uses: actions/upload-artifact@v2
79+
with:
80+
path: upstream
81+
name: upstream
82+
83+
linux:
84+
uses: sagemath/sage/.github/workflows/docker.yml@develop
85+
with:
86+
# Sage distribution packages to build
87+
targets: SAGE_CHECK=no SAGE_CHECK_flint=warn SAGE_CHECK_python_flint=yes python_flint
88+
# Standard setting: Test the current beta release of Sage:
89+
sage_repo: sagemath/sage
90+
sage_ref: refs/pull/37224/head
91+
#sage_ref: develop
92+
upstream_artifact: upstream
93+
# Docker targets (stages) to tag
94+
docker_targets: "with-targets"
95+
# We prefix the image name with the SPKG name ("python_flint_") to avoid the error
96+
# 'Package "sage-docker-..." is already associated with another repository.'
97+
docker_push_repository: ghcr.io/${{ github.repository }}/python_flint_
98+
needs: [dist]
99+
100+
macos:
101+
uses: sagemath/sage/.github/workflows/macos.yml@develop
102+
with:
103+
osversion_xcodeversion_toxenv_tuples: >-
104+
[["latest", "", "homebrew-macos-usrlocal-minimal"],
105+
["latest", "", "homebrew-macos-usrlocal-standard"]]
106+
targets: SAGE_CHECK=no SAGE_CHECK_flint=warn SAGE_CHECK_python_flint=yes python_flint
107+
# Standard setting: Test the current beta release of Sage:
108+
sage_repo: sagemath/sage
109+
sage_ref: refs/pull/37224/head
110+
#sage_ref: develop
111+
upstream_artifact: upstream
112+
needs: [dist]

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ MANIFEST
1717
*.swp
1818
.python-version
1919
*.DS_Store
20+
.venv

0 commit comments

Comments
 (0)