1
1
Setup
2
2
===============================================================================
3
3
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).
5
5
See:
6
6
7
7
* http://flintlib.org/
@@ -13,7 +13,13 @@ The latest release can be installed using::
13
13
14
14
pip install python-flint
15
15
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.
17
23
(https://anaconda.org/conda-forge/python-flint).
18
24
It can be installed using::
19
25
@@ -24,19 +30,20 @@ as follows::
24
30
25
31
pip install .
26
32
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::
29
35
30
- sudo apt-get install cython python-dev
36
+ pip install Cython numpy
31
37
32
38
Then run::
33
39
34
40
python setup.py build_ext
35
- sudo python setup.py install
41
+ python setup.py install
36
42
37
43
Run the test suite::
38
44
39
45
python test/test.py
46
+ python test/dtest.py
40
47
41
48
Build the documentation::
42
49
@@ -59,3 +66,41 @@ where to find the library files using something like::
59
66
60
67
export LD_LIBRARY_PATH=/home/fredrik/src/flint2:/home/fredrik/src/arb:$LD_LIBRARY_PATH
61
68
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