Skip to content

Bump version to 0.4.0 #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
include LICENSE
include CHANGES
include README
include src/*.pxd
include src/*.pyx
include src/*.py
include src/flint/*.pxd
include src/flint/*.pyx
include src/flint/*.py
include test/*.py
include doc/source/*.py
include doc/source/*.rst
include doc/Makefile
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ as follows:
pip install .

See the documentation for further notes on building and installing
Python-FLINT.
Python-FLINT:

https://fredrikj.net/python-flint/setup.html

Examples
-------------------------------------
Expand Down
1 change: 0 additions & 1 deletion bin/activate
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ export C_INCLUDE_PATH=$(pwd)/.local/include
export LIBRARY_PATH=$(pwd)/.local/lib
export LD_LIBRARY_PATH=$(pwd)/.local/lib
export PYTHONPATH=$(pwd)/src
source .local/venv/bin/activate
3 changes: 2 additions & 1 deletion bin/build_dependencies_unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@ cd arb-$ARBVER
#
PATH=$PATH:$PREFIX/lib:$PREFIX/bin \
ARB_TEST_MULTIPLIER=0.1 \
make check
# Skip Arb tests now because they are slow.
# make check
cd ..

# ------------------------------------------------------------------------- #
Expand Down
4 changes: 2 additions & 2 deletions bin/build_mingw64_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fi
PYTHON=$PYTHONDIR/python
VER="${PYTHONVER//./}"

WHEELNAME=python_flint-0.3.0-cp$VER-cp$VER-win_amd64.whl
WHEELNAME=python_flint-0.4.0-cp$VER-cp$VER-win_amd64.whl

$PYTHON -c 'print("hello world")'

Expand Down Expand Up @@ -90,7 +90,7 @@ wheel pack python_flint-*
cd ..

# Make the wheel relocatable
delvewheel repair dist/python_flint-0.3.0-cp$VER-cp$VER-win_amd64.whl \
delvewheel repair dist/python_flint-0.4.0-cp$VER-cp$VER-win_amd64.whl \
--add-path .local/bin:.local/lib/

# Make a virtual enironment to test the wheel
Expand Down
4 changes: 2 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
# built documents.
#
# The short X.Y version.
version = '0.3.0'
version = '0.4.0'
# The full version, including alpha/beta/rc tags.
release = '0.3.0'
release = '0.4.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
57 changes: 51 additions & 6 deletions doc/source/setup.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Setup
===============================================================================

First install both FLINT (version 2.5 or later) and Arb (version 2.16 or later).
First install both FLINT (version 2.9 or later) and Arb (version 2.23 or later).
See:

* http://flintlib.org/
Expand All @@ -13,7 +13,13 @@ The latest release can be installed using::

pip install python-flint

Python-FLINT is also available on conda-forge
Binary wheels are provided for Windows amd64, Linux (manylinux 2_17) x86_64,
macOS x86_64 and macOS arm64. For other platforms, pip will attempt to build
Python-FLINT from source which requires a C compiler and the FLINT and Arb
header files and library files (libflint.so and libarb.so) to be available as
well as the Python development headers and Cython and numpy.

Python-FLINT is also available on conda-forge for Linux and macOS.
(https://anaconda.org/conda-forge/python-flint).
It can be installed using::

Expand All @@ -24,19 +30,20 @@ as follows::

pip install .

To build Python-FLINT manually, you may first have to install
some build dependencies::
To build Python-FLINT manually, you first need to install some build
dependencies::

sudo apt-get install cython python-dev
pip install Cython numpy

Then run::

python setup.py build_ext
sudo python setup.py install
python setup.py install

Run the test suite::

python test/test.py
python test/dtest.py

Build the documentation::

Expand All @@ -59,3 +66,41 @@ where to find the library files using something like::

export LD_LIBRARY_PATH=/home/fredrik/src/flint2:/home/fredrik/src/arb:$LD_LIBRARY_PATH

Build all dependencies from source
----------------------------------

From a VCS checkout, to build python-flint and all dependencies from source,
using the exact versions that are tested in CI and used for the binary PyPI
wheels, run the following in a unix shell::

source bin/activate
bin/build_dependencies_unix.sh

The script will download and build GMP, MPFR, FLINT and Arb and build them all
in a ``.local`` directory. The ``bin/activate`` script sets the appropriate
path environment variables for C headers and libraries which is needed for
the ``build_dependencies_unix.sh`` script to work. After running the script,
you can then build Python-FLINT in place with::

python setup.py build_ext --in-place

and run the test suite with::

python test/test.py
python test/dtest.py

This way of building Python-FLINT depends on the ``bin/activate`` script to
locate the shared libraries at runtime. The script will also set ``PYTHONPATH``
so that the in-place build of Python-FLINT can be imported.

These steps will also work under MinGW with the mingw64 toolchain, but you
should first run::

echo '[build]' > setup.cfg
echo 'compiler = mingw32' >> setup.cfg

# Install the mingw-w64 toolchain
pacman -S --noconfirm mingw-w64-x86_64-gcc m4 make mingw-w64-x86_64-tools-git

To change the versions of the dependencies that are built, edit the
``bin/build_variables.sh`` script.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
packages=['flint'],
package_dir={'': 'src'},
description='Bindings for FLINT and Arb',
version='0.3.0',
version='0.4.0',
url='https://github.com/python-flint/python-flint',
author='Fredrik Johansson',
author_email='[email protected]',
Expand Down
2 changes: 2 additions & 0 deletions src/flint/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
from ._flint import *

__version__ = '0.4.0'
3 changes: 3 additions & 0 deletions test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ def raises(f, exception):
"""

def test_pyflint():

assert flint.__version__ == "0.4.0"

ctx = flint.ctx
assert str(ctx) == repr(ctx) == _default_ctx_string
assert ctx.prec == 53
Expand Down