PageRenderTime 25ms CodeModel.GetById 14ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 1ms

/README

http://gmpy.googlecode.com/
#! | 84 lines | 60 code | 24 blank | 0 comment | 0 complexity | 710d273e9024e650e263992b52bd2b05 MD5 | raw file
 1Installing gmpy2 on Unix/Linux
 2------------------------------
 3
 4Many Linux distributions provide gmpy2 in their repositories. Please check
 5your distribution's repositories first.
 6
 7Requirements
 8------------
 9
10gmpy2 requires recent versions of GMP, MPFR and MPC. Specfically, gmpy2
11requires GMP 5.0.0 or later, MPFR 3.1.0 or later, and MPC 1.0.0 or later.
12
13Quick Instructions
14------------------
15
16To manually compile gmpy2, you will need to install the development libraries
17for Python, GMP, MPFR, and MPC are installed. The package names vary between
18distributions. "python-dev", "python2-dev", or "python3.4-dev" are typical
19package names for the Python development files. Installing the MPC development
20package should automatically install the GMP and MPFR development packages.
21"libmpc-dev" is a typical name for the MPC development package.
22
23Once the required development libraries have been installed, compiling should
24be as simple as:
25
26    $ cd <gmpy2 source directory>
27    $ python setup.py build_ext
28    $ sudo python setup.py install
29
30If this fails, read on.
31
32Detailed Instructions
33---------------------
34
35If your Linux distribution does not support recent versions of GMP, MPFR and
36MPC, you will need to compile your own versions. To avoid any possible conflict
37with existing libraries on your system, it is recommended to build a statically
38linked version of gmpy2. The following instructions assume the GMP, MPFR, MPC,
39and gmpy2 source files are all located in $HOME/src and the static libraries
40are installed into $HOME/static
41
421. Create the desired destination directory for the GMP, MPFR, and MPC
43   libraries.
44
45    $ mkdir $HOME/static
46
472. Download and un-tar the GMP source code. Change to GMP source directory and
48   compile GMP.
49
50    $ cd $HOME/src/gmp-6.0.0
51    $ ./configure --prefix=$HOME/static --enable-static --disable-shared --with-pic
52    $ make
53    $ make check
54    $ make install
55
563. Download and un-tar the MPFR source code. Change to MPFR source directory
57   and compile MPFR.
58
59    $ cd $HOME/src/mpfr-3.1.2
60    $ ./configure --prefix=$HOME/static --enable-static --disable-shared --with-pic --with-gmp=$HOME/static
61    $ make
62    $ make check
63    $ make install
64
654. Download and un-tar the MPC source code. Change to MPC source directory
66   and compile MPC.
67
68    $ cd $HOME/src/mpc-1.0.3
69    $ ./configure --prefix=$HOME/static --enable-static --disable-shared --with-pic --with-gmp=$HOME/static --with-mpfr=$HOME/static
70    $ make
71    $ make check
72    $ make install
73
745. Compile gmpy2 and specify the location of GMP, MPFR and MPC.
75
76    $ cd $HOME/src/gmpy2-2.1.0
77    $ python setup.py build_ext --static=$HOME/static install
78
79If you get a "permission denied" error message, you may need to use:
80
81    $ python setup.py build_ext --static=$HOME/static
82    $ sudo python setup.py install
83
84