From 16985978186e4c0571b4662c99a2d41672abe062 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Wed, 18 May 2022 20:01:34 +0100 Subject: [PATCH 1/6] maint: test building with flint 2.9.0-beta1 --- bin/build_dependencies_unix.sh | 6 +++--- bin/build_variables.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/build_dependencies_unix.sh b/bin/build_dependencies_unix.sh index 26e04e76..0f141d24 100755 --- a/bin/build_dependencies_unix.sh +++ b/bin/build_dependencies_unix.sh @@ -149,9 +149,9 @@ cd .. # # # ------------------------------------------------------------------------- # -curl -O https://www.flintlib.org/flint-$FLINTVER.tar.gz -tar xf flint-$FLINTVER.tar.gz -cd flint-$FLINTVER +curl -O -L https://github.com/wbhart/flint2/archive/refs/tags/$FLINTVER.tar.gz +tar xf $FLINTVER.tar.gz +cd flint2-$FLINTVER ./configure --prefix=$PREFIX\ $FLINTARB_WITHGMP\ --with-mpfr=$PREFIX\ diff --git a/bin/build_variables.sh b/bin/build_variables.sh index 253f787e..27d05bb8 100644 --- a/bin/build_variables.sh +++ b/bin/build_variables.sh @@ -17,5 +17,5 @@ GMPVER=6.2.1 YASMVER=1.3.0 MPIRVER=3.0.0 MPFRVER=4.1.0 -FLINTVER=2.8.4 +FLINTVER='2.9.0-beta1' ARBVER=2.22.0 From eb9dde4f89525cc639151a52dab49e6310c371ec Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 1 Dec 2022 17:21:39 +0000 Subject: [PATCH 2/6] maint: bump versions: flint-2.9.0 arb-2.23.0 --- bin/build_dependencies_unix.sh | 6 +++--- bin/build_variables.sh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/build_dependencies_unix.sh b/bin/build_dependencies_unix.sh index 0f141d24..544599dd 100755 --- a/bin/build_dependencies_unix.sh +++ b/bin/build_dependencies_unix.sh @@ -149,9 +149,9 @@ cd .. # # # ------------------------------------------------------------------------- # -curl -O -L https://github.com/wbhart/flint2/archive/refs/tags/$FLINTVER.tar.gz -tar xf $FLINTVER.tar.gz -cd flint2-$FLINTVER +curl -O -L https://www.flintlib.org/flint-$FLINTVER.tar.gz +tar xf flint-$FLINTVER.tar.gz +cd flint-$FLINTVER ./configure --prefix=$PREFIX\ $FLINTARB_WITHGMP\ --with-mpfr=$PREFIX\ diff --git a/bin/build_variables.sh b/bin/build_variables.sh index 27d05bb8..50d673f4 100644 --- a/bin/build_variables.sh +++ b/bin/build_variables.sh @@ -17,5 +17,5 @@ GMPVER=6.2.1 YASMVER=1.3.0 MPIRVER=3.0.0 MPFRVER=4.1.0 -FLINTVER='2.9.0-beta1' -ARBVER=2.22.0 +FLINTVER=2.9.0 +ARBVER=2.23.0 From 006f852cbf4fb4ccfd19d57705558731f95325f8 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 1 Dec 2022 17:46:15 +0000 Subject: [PATCH 3/6] fix: update fmpq_poly_struct and arith_divisor_sigma --- src/flint/_flint.pxd | 4 ++-- src/flint/fmpz.pyx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/flint/_flint.pxd b/src/flint/_flint.pxd index ce5cb869..bf1e9627 100644 --- a/src/flint/_flint.pxd +++ b/src/flint/_flint.pxd @@ -532,9 +532,9 @@ cdef extern from "flint/fmpq.h": cdef extern from "flint/fmpq_poly.h": ctypedef struct fmpq_poly_struct: fmpz_struct * coeffs - fmpz_t den long alloc long length + fmpz_t den ctypedef fmpq_poly_struct fmpq_poly_t[1] void fmpq_poly_init(fmpq_poly_t poly) void fmpq_poly_init2(fmpq_poly_t poly, long alloc) @@ -703,7 +703,7 @@ cdef extern from "flint/fmpq_mat.h": cdef extern from "flint/arith.h": void arith_number_of_partitions(fmpz_t res, ulong n) int arith_moebius_mu(fmpz_t n) - void arith_divisor_sigma(fmpz_t v, fmpz_t n, ulong k) + void arith_divisor_sigma(fmpz_t v, ulong k, fmpz_t n) void arith_euler_phi(fmpz_t v, fmpz_t n) void arith_bell_number(fmpz_t v, ulong n) void arith_euler_number(fmpz_t v, ulong n) diff --git a/src/flint/fmpz.pyx b/src/flint/fmpz.pyx index 3333b1bb..5cf5ff01 100644 --- a/src/flint/fmpz.pyx +++ b/src/flint/fmpz.pyx @@ -559,7 +559,7 @@ cdef class fmpz(flint_scalar): 605263138639095300 """ cdef fmpz v = fmpz() - arith_divisor_sigma(v.val, n.val, k) + arith_divisor_sigma(v.val, k, n.val) return v def euler_phi(n): From 8ada1ee0dae2bf25b597da0e5a1ef876c195feed Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 1 Dec 2022 17:48:29 +0000 Subject: [PATCH 4/6] maint: update versions of actions in CI --- .github/workflows/buildwheel.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index 2b2da417..833339b2 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -14,7 +14,7 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 - name: Build wheels uses: pypa/cibuildwheel@v2.3.1 @@ -46,8 +46,8 @@ jobs: python-version: ['3.7', '3.8', '3.9', '3.10'] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - uses: actions/download-artifact@v3 From ae578bbef16c0f25b5b16ceb4a5f828216606818 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 1 Dec 2022 18:14:25 +0000 Subject: [PATCH 5/6] maint: add Python 3.11 wheels --- .github/workflows/buildwheel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index 833339b2..96c6963e 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -19,7 +19,7 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v2.3.1 env: - CIBW_BUILD: cp37-* cp38-* cp39-* cp310-* + CIBW_BUILD: cp39-* cp310-* cp311-* CIBW_SKIP: "*-win32 *-manylinux_i686 *-musllinux_*" CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 CIBW_BEFORE_ALL_LINUX: bin/cibw_before_build_linux.sh @@ -43,7 +43,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-20.04, macOS-10.15] - python-version: ['3.7', '3.8', '3.9', '3.10'] + python-version: ['3.9', '3.10', '3.11'] steps: - uses: actions/checkout@v3 From 855cd020a83bf020d00f15fa84f2b70fc7f2302e Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 1 Dec 2022 19:09:56 +0000 Subject: [PATCH 6/6] maint: update actions versions in CI --- .github/workflows/buildwheel.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index 96c6963e..cc681a8b 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -14,10 +14,13 @@ jobs: steps: - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.10' - name: Build wheels - uses: pypa/cibuildwheel@v2.3.1 + uses: pypa/cibuildwheel@v2.11.2 env: CIBW_BUILD: cp39-* cp310-* cp311-* CIBW_SKIP: "*-win32 *-manylinux_i686 *-musllinux_*" @@ -31,7 +34,7 @@ jobs: LD_LIBRARY_PATH=$(pwd)/.local/lib:$LD_LIBRARY_PATH CIBW_TEST_COMMAND: python -c 'import flint; print(str(flint.fmpz(2)))' - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: path: wheelhouse/*.whl