diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index 8b01fea5..17eb5296 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -57,6 +57,25 @@ jobs: with: path: wheelhouse/*.whl + build_sdist: + name: Build sdist + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-python@v4 + with: + python-version: '3.11' + + - run: pip install --upgrade pip + - run: pip install cython numpy + - run: python setup.py sdist + + - uses: actions/upload-artifact@v3 + with: + path: dist/*.tar.gz + test_wheels: needs: build_wheels name: Test ${{ matrix.python-version }} wheel on ${{ matrix.os }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6ddc8b57..00000000 --- a/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ -dist: xenial - -language: python - -sudo: true - -python: - - 2.7 - - 3.6 - - 3.7-dev - -before_install: - - sudo apt-get install cython python-dev - - pip install Cython - - sudo apt-get install libmpfr-dev - - sudo apt-get install libflint-dev - - wget https://github.com/fredrik-johansson/arb/archive/2.16.0.tar.gz - - mv 2.16.0.tar.gz arb-2.16.0.tar.gz - - tar -xf arb-2.16.0.tar.gz - - cd arb-2.16.0 - - ./configure --disable-static - - make -j4 - - sudo make install - - sudo ldconfig - - cd .. - -install: - - pip install . - -script: - - python -m flint.test diff --git a/README.md b/README.md index d75966cb..829133b0 100644 --- a/README.md +++ b/README.md @@ -11,24 +11,32 @@ and Arb (arbitrary-precision ball arithmetic). Features: Documentation: http://fredrikj.net/python-flint/ -Repository: https://github.com/fredrik-johansson/python-flint/ +Repository: https://github.com/flintlib/python-flint/ Author: Fredrik Johansson Installation ------------ -On Windows (x86-64) or OSX (x86-64 or arm64) there are prebuilt wheels for -python-flint 0.4.1 that can be installed from PyPI using pip +For Windows (x86-64) or OSX (x86-64 or arm64) or Linux (x86-64 +`manylinux_2_17`) there are binary wheels for python-flint on PyPI. For these +platforms python-flint can be installed simply with `pip` pip install python-flint -There is currently a problem with the Linux wheels and so for now Linux wheels -are not available on PyPI. Instead for Linux first install both FLINT 2.9.0 and -Arb 2.23. Note that as of python-flint 0.4.1 only these *exact* versions of -FLINT and Arb will work. While some Linux distributions may provide FLINT and -Arb it is unlikely that they will provide the exact versions required (e.g. -for Ubuntu only Ubuntu 23.04 provides these versions at the time of writing). +Alternatively python-flint can be installed using `conda` + + conda install -c conda-forge python-flint + +Build from source +----------------- + +For other platforms or architectures installation needs to build from source. +First install both FLINT 2.9.0 and Arb 2.23. Note that for python-flint 0.4 +only these *exact* versions of FLINT and Arb will work. While some Linux +distributions may provide FLINT and Arb it is unlikely that they will provide +the exact versions required (e.g. for Ubuntu only Ubuntu 23.04 provides these +versions at the time of writing). See here for instructions on building FLINT and Arb: @@ -49,7 +57,7 @@ as follows: A script that builds and installs FLINT, Arb and Python-FLINT that is tested on Ubuntu can be found in the git repo here: -* https://github.com/fredrik-johansson/python-flint/blob/master/bin/pip_install_ubuntu.sh +* https://github.com/flintlib/python-flint/blob/master/bin/pip_install_ubuntu.sh See the documentation for further notes on building and installing Python-FLINT: diff --git a/bin/build_dependencies_unix.sh b/bin/build_dependencies_unix.sh index 5d9ede5a..b7753b8f 100755 --- a/bin/build_dependencies_unix.sh +++ b/bin/build_dependencies_unix.sh @@ -118,7 +118,7 @@ if [ $USE_GMP = "gmp" ]; then --enable-fat\ --enable-shared=yes\ --enable-static=no\ - --host=$HOSTARG + --host=$HOST_ARG make -j3 make install cd .. diff --git a/bin/build_mingw64_wheel.sh b/bin/build_mingw64_wheel.sh index 3ce1787d..8d093efe 100755 --- a/bin/build_mingw64_wheel.sh +++ b/bin/build_mingw64_wheel.sh @@ -11,7 +11,7 @@ # # - Then checkout the code: # -# $ git clone https://github.com/fredrik-johansson/python-flint/issues/1 +# $ git clone https://github.com/flintlib/python-flint.git # # - Then install msys2 # @@ -44,7 +44,7 @@ fi PYTHON=$PYTHONDIR/python VER="${PYTHONVER//./}" -WHEELNAME=python_flint-0.4.1-cp$VER-cp$VER-win_amd64.whl +WHEELNAME=python_flint-0.4.2-cp$VER-cp$VER-win_amd64.whl $PYTHON -c 'print("hello world")' @@ -90,7 +90,7 @@ wheel pack python_flint-* cd .. # Make the wheel relocatable -delvewheel repair dist/python_flint-0.4.1-cp$VER-cp$VER-win_amd64.whl \ +delvewheel repair dist/python_flint-0.4.2-cp$VER-cp$VER-win_amd64.whl \ --add-path .local/bin:.local/lib/ # Make a virtual enironment to test the wheel diff --git a/bin/pip_install_ubuntu.sh b/bin/pip_install_ubuntu.sh index ecc8ebf7..5f7b7516 100755 --- a/bin/pip_install_ubuntu.sh +++ b/bin/pip_install_ubuntu.sh @@ -4,7 +4,7 @@ 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 +# $ git checkout https://github.com/flintlib/python-flint.git # $ bin/pip_install_ubuntu.sh . # # To install an sdist from PyPI, use @@ -18,12 +18,12 @@ set -o errexit # 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). +# (for python-flint 0.4.x). 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 +# main CI tests and wheels for python-flint 0.4.x are built with Flint 2.9.0 # and Arb 2.23.0. # # Link against libflint-arb instead of libarb on Ubuntu diff --git a/doc/source/conf.py b/doc/source/conf.py index 98ff53aa..416f2298 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -51,9 +51,9 @@ # built documents. # # The short X.Y version. -version = '0.4.1' +version = '0.4.2' # The full version, including alpha/beta/rc tags. -release = '0.4.1' +release = '0.4.2' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/doc/source/index.rst b/doc/source/index.rst index bde77916..bc7c7ae1 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -20,7 +20,7 @@ and Arb_ (arbitrary-precision ball arithmetic). Features: Author: `Fredrik Johansson `_ -Repository: https://github.com/fredrik-johansson/python-flint/ +Repository: https://github.com/flintlib/python-flint/ Introduction ------------ diff --git a/setup.py b/setup.py index 4396cc53..ecd4267a 100644 --- a/setup.py +++ b/setup.py @@ -77,8 +77,8 @@ description='Bindings for FLINT and Arb', long_description=open('README.md').read(), long_description_content_type='text/markdown', - version='0.4.1', - url='https://github.com/python-flint/python-flint', + version='0.4.2', + url='https://github.com/flintlib/python-flint', author='Fredrik Johansson', author_email='fredrik.johansson@gmail.com', license='MIT', diff --git a/src/flint/__init__.py b/src/flint/__init__.py index cec8c1bf..032778c8 100644 --- a/src/flint/__init__.py +++ b/src/flint/__init__.py @@ -1,3 +1,3 @@ from ._flint import * -__version__ = '0.4.1' +__version__ = '0.4.2' diff --git a/src/flint/test/test.py b/src/flint/test/test.py index 7d30a34e..f865163b 100644 --- a/src/flint/test/test.py +++ b/src/flint/test/test.py @@ -30,7 +30,7 @@ def raises(f, exception): def test_pyflint(): - assert flint.__version__ == "0.4.1" + assert flint.__version__ == "0.4.2" ctx = flint.ctx assert str(ctx) == repr(ctx) == _default_ctx_string