Skip to content

Commit 267e31a

Browse files
committed
Test with flint 3.0.0 and also git main
1 parent eead345 commit 267e31a

2 files changed

Lines changed: 58 additions & 16 deletions

File tree

.github/workflows/buildwheel.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ jobs:
125125
fail-fast: false
126126
matrix:
127127
python-version: ['3.11', '3.12', '3.13-dev']
128-
# '.' means install from git checkout
128+
# '.' means install from python-flint git checkout
129129
# 'python-flint' means install from PyPI sdist
130130
target: ['.', 'python-flint']
131131
steps:
@@ -135,3 +135,19 @@ jobs:
135135
python-version: ${{ matrix.python-version }}
136136
- run: bin/pip_install_ubuntu.sh ${{ matrix.target }}
137137
- run: python -m flint.test --verbose
138+
139+
test_flint_versions:
140+
name: pip install ${{ matrix.target }} on ${{ matrix.python-version }}
141+
runs-on: ubuntu-22.04
142+
strategy:
143+
fail-fast: false
144+
matrix:
145+
# minimum supported version and latest git
146+
flint: ['v3.0.0', 'main']
147+
steps:
148+
- uses: actions/checkout@v3
149+
- uses: actions/setup-python@v4
150+
with:
151+
python-version: 3.12
152+
- run: bin/pip_install_ubuntu.sh . ${{ matrix.flint }}
153+
- run: python -m flint.test --verbose

bin/pip_install_ubuntu.sh

Lines changed: 41 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,39 @@ set -o errexit
44

55
# This script should work to install python-flint on Ubuntu from a VCS checkout
66
#
7-
# $ git checkout https://github.com/flintlib/python-flint.git
7+
# $ git clone https://github.com/flintlib/python-flint.git
8+
# $ cd python-flint
89
# $ bin/pip_install_ubuntu.sh .
910
#
1011
# To install an sdist from PyPI, use
1112
#
1213
# $ bin/pip_install_ubuntu.sh python-flint
1314
#
15+
# The Flint version to build can be provided as an argument, e.g.
16+
#
17+
# $ bin/pip_install_ubuntu.sh python-flint v3.0.1
18+
#
19+
# The version is a tag or branch in the Flint repository. If not provided, the
20+
# script will default to downloading the release tarball hard-coded below. Only
21+
# Flint 3 or newer will work.
22+
23+
if [ -z "$2" ]; then
24+
echo "Building from release tarball"
25+
FLINT_GIT=""
26+
FLINTVER=3.0.1
27+
else
28+
echo "Building from git: $2"
29+
FLINT_GIT=$2
30+
fi
31+
# Either . or python-flint. Passed to pip install
32+
PYTHON_FLINT=$1
1433

1534
# Install runtime and build dependencies
1635

1736
# First install their dependencies and build dependencies
1837
sudo apt-get update
1938
sudo apt-get install libgmp-dev libmpfr-dev xz-utils
2039

21-
# Only Flint 3 or newer will work.
22-
FLINTVER=3.0.1
23-
2440
# This will default to installing in /usr/local. If you want to install in a
2541
# non-standard location then configure flint with
2642
# ./configure --disable-static --prefix=$PREFIX
@@ -29,24 +45,34 @@ FLINTVER=3.0.1
2945
# and at runtime set
3046
# export LD_LIBRARY_PATH=$PREFIX/lib
3147

32-
curl -O -L https://www.flintlib.org/flint-$FLINTVER.tar.gz
33-
tar xf flint-$FLINTVER.tar.gz
34-
cd flint-$FLINTVER
35-
./bootstrap.sh
36-
./configure --disable-static
37-
make -j
38-
sudo make install
39-
cd ..
48+
if [ -z "$FLINT_GIT" ]; then
49+
# Install from release tarball
50+
echo "Installing Flint $FLINTVER from release tarball"
51+
curl -O -L https://www.flintlib.org/flint-$FLINTVER.tar.gz
52+
tar xf flint-$FLINTVER.tar.gz
53+
cd flint-$FLINTVER
54+
else
55+
# Install from git
56+
echo "Installing Flint from git: $FLINT_GIT"
57+
git clone https://github.com/flintlib/flint.git
58+
cd flint
59+
git checkout $FLINT_GIT
60+
fi
61+
62+
./bootstrap.sh
63+
./configure --disable-static
64+
make -j
65+
sudo make install
4066

4167
ls -l /usr/local/lib
4268
sudo ldconfig /usr/local/lib
4369

44-
# Install from checkout (or sdist).
70+
# Build python-flint from sdist
4571
echo -----------------------------------------------------------
4672
echo
4773
echo Running:
48-
echo $ pip install --no-binary :all: $1
74+
echo $ pip install --no-binary :all: $PYTHON_FLINT
4975
echo
5076
echo -----------------------------------------------------------
5177

52-
pip install --no-binary :all: $1
78+
pip install --no-binary :all: $PYTHON_FLINT

0 commit comments

Comments
 (0)