-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from oscarbenjamin/pr_pip_linux
Add tests for installing on Linux
- Loading branch information
Showing
15 changed files
with
300 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,4 +28,4 @@ install: | |
- pip install . | ||
|
||
script: | ||
- python test/test.py | ||
- python -m flint.test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
#!/bin/bash | ||
|
||
set -o errexit | ||
|
||
# This script should work to install python-flint on Ubuntu from a VCS checkout | ||
# | ||
# $ git checkout https://github.com/fredrik-johansson/python-flint.git | ||
# $ bin/pip_install_ubuntu.sh . | ||
# | ||
# To install an sdist from PyPI, use | ||
# | ||
# $ bin/pip_install_ubuntu.sh python-flint | ||
# | ||
|
||
# Install runtime and build dependencies | ||
|
||
# The commented commands below would attempt to build python-flint against a | ||
# system installation of Flint and Arb in Ubuntu. | ||
# | ||
# Ubuntu 23.04 has Flint 2.9.0 and Arb 2.23.0, so this script might work there | ||
# (for python-flint 0.4.1). That is untested though (23.04 not available in CI). | ||
# | ||
# With Ubuntu 22.04, this will build but then crashes when running the tests. | ||
# most likely this is because the versions of flint and flint-arb are too old. | ||
# At the time of writing in Ubuntu 22.04 there is Flint 2.8.4 and Arb 2.22. The | ||
# main CI tests and wheels for python-flint 0.4.1 are built with Flint 2.9.0 | ||
# and Arb 2.23.0. | ||
# | ||
# Link against libflint-arb instead of libarb on Ubuntu | ||
# export PYTHON_FLINT_LIBFLINT_ARB=1 | ||
# sudo apt-get update | ||
# sudo apt-get install libflint-dev libflint-arb-dev | ||
|
||
|
||
# Build Flint and Arb manually | ||
# | ||
# First install their dependencies and build dependencies | ||
sudo apt-get update | ||
sudo apt-get install libgmp-dev libmpfr-dev xz-utils | ||
|
||
# Only these *EXACT* versions will work. | ||
FLINTVER=2.9.0 | ||
ARBVER=2.23.0 | ||
|
||
# This will default to installing in /usr/local. If you want to install in a | ||
# non-standard location then configure flint with | ||
# ./configure --disable-static --prefix=$PREFIX | ||
# and arb with | ||
# ./configure --disable-static --prefix=$PREFIX --with-flint=$PREFIX | ||
# If $PREFIX is no in default search paths, then at build time set | ||
# export C_INCLUDE_PATH=$PREFIX/include | ||
# and at runtime set | ||
# export LD_LIBRARY_PATH=$PREFIX/lib | ||
|
||
curl -O -L https://www.flintlib.org/flint-$FLINTVER.tar.gz | ||
tar xf flint-$FLINTVER.tar.gz | ||
cd flint-$FLINTVER | ||
./configure --disable-static | ||
make -j | ||
sudo make install | ||
cd .. | ||
|
||
curl -O -L https://github.com/fredrik-johansson/arb/archive/refs/tags/$ARBVER.tar.gz | ||
mv $ARBVER.tar.gz arb-$ARBVER.tar.gz | ||
tar xf arb-$ARBVER.tar.gz | ||
cd arb-$ARBVER | ||
./configure --disable-static | ||
make -j | ||
sudo make install | ||
cd .. | ||
|
||
ls -l /usr/local/lib | ||
sudo ldconfig /usr/local/lib | ||
|
||
# Python build requirements. Ideally these would be in pyprojec.toml, but | ||
# first need to migrate from setup.py to pyproject.toml. | ||
pip install 'cython>=3' numpy wheel | ||
|
||
# Install from checkout (or sdist). | ||
echo ----------------------------------------------------------- | ||
echo | ||
echo Running: | ||
echo $ pip install --no-build-isolation $1 | ||
echo | ||
echo ----------------------------------------------------------- | ||
|
||
pip install --no-build-isolation $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
from ._flint import * | ||
|
||
__version__ = '0.4.0' | ||
__version__ = '0.4.1' |
Empty file.
Oops, something went wrong.