11Setup
22===============================================================================
33
4- First install both FLINT (version 2.5 or later) and Arb (version 2.16 or later).
4+ First install both FLINT (version 2.9 or later) and Arb (version 2.23 or later).
55See:
66
77* http://flintlib.org/
@@ -13,7 +13,13 @@ The latest release can be installed using::
1313
1414 pip install python-flint
1515
16- Python-FLINT is also available on conda-forge
16+ Binary wheels are provided for Windows amd64, Linux (manylinux 2_17) x86_64,
17+ macOS x86_64 and macOS arm64. For other platforms, pip will attempt to build
18+ Python-FLINT from source which requires a C compiler and the FLINT and Arb
19+ header files and library files (libflint.so and libarb.so) to be available as
20+ well as the Python development headers and Cython and numpy.
21+
22+ Python-FLINT is also available on conda-forge for Linux and macOS.
1723(https://anaconda.org/conda-forge/python-flint).
1824It can be installed using::
1925
@@ -24,19 +30,20 @@ as follows::
2430
2531 pip install .
2632
27- To build Python-FLINT manually, you may first have to install
28- some build dependencies::
33+ To build Python-FLINT manually, you first need to install some build
34+ dependencies::
2935
30- sudo apt-get install cython python-dev
36+ pip install Cython numpy
3137
3238Then run::
3339
3440 python setup.py build_ext
35- sudo python setup.py install
41+ python setup.py install
3642
3743Run the test suite::
3844
3945 python test/test.py
46+ python test/dtest.py
4047
4148Build the documentation::
4249
@@ -59,3 +66,41 @@ where to find the library files using something like::
5966
6067 export LD_LIBRARY_PATH=/home/fredrik/src/flint2:/home/fredrik/src/arb:$LD_LIBRARY_PATH
6168
69+ Build all dependencies from source
70+ ----------------------------------
71+
72+ From a VCS checkout, to build python-flint and all dependencies from source,
73+ using the exact versions that are tested in CI and used for the binary PyPI
74+ wheels, run the following in a unix shell::
75+
76+ source bin/activate
77+ bin/build_dependencies_unix.sh
78+
79+ The script will download and build GMP, MPFR, FLINT and Arb and build them all
80+ in a ``.local `` directory. The ``bin/activate `` script sets the appropriate
81+ path environment variables for C headers and libraries which is needed for
82+ the ``build_dependencies_unix.sh `` script to work. After running the script,
83+ you can then build Python-FLINT in place with::
84+
85+ python setup.py build_ext --in-place
86+
87+ and run the test suite with::
88+
89+ python test/test.py
90+ python test/dtest.py
91+
92+ This way of building Python-FLINT depends on the ``bin/activate `` script to
93+ locate the shared libraries at runtime. The script will also set ``PYTHONPATH ``
94+ so that the in-place build of Python-FLINT can be imported.
95+
96+ These steps will also work under MinGW with the mingw64 toolchain, but you
97+ should first run::
98+
99+ echo '[build]' > setup.cfg
100+ echo 'compiler = mingw32' >> setup.cfg
101+
102+ # Install the mingw-w64 toolchain
103+ pacman -S --noconfirm mingw-w64-x86_64-gcc m4 make mingw-w64-x86_64-tools-git
104+
105+ To change the versions of the dependencies that are built, edit the
106+ ``bin/build_variables.sh `` script.
0 commit comments