PageRenderTime 37ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/README

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