File: windows_build.txt

package info (click to toggle)
python-gmpy 1.11-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 752 kB
  • ctags: 756
  • sloc: ansic: 10,001; python: 5,514; makefile: 36
file content (61 lines) | stat: -rw-r--r-- 2,244 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Instructions for compiling GMPY for 32-bit Windows.

GMPY binaries can be compiled for the Windows operating systems using
the free MinGW toolkit. The MinGW toolkit provides a Minimalist GNU
for Windows environment. If you are trying to build a 64-bit version
of GMPY, please refer to "win_x64_sdk_build.txt".

The following instructions use the MPIR multiple-precision library
instead of the GMP library.

1) Download and install MinGW-5.1.6.exe. Choose the "current" release.

2) Download and install MSYS-1.0.11.exe.

3) The following instructions assume that both Python and gcc (part of
   MinGW) exist on the operating system PATH. On Windows XP, this can be
   done using Settings -> Control Panel -> System -> Environment Variables.

   If not already present, add c:\python26 and c:\mingw\bin to the PATH.
   The entries should be separated by a semi-colon. Note: Python 2.6 is
   used in this example.

4) A icon entitled "MSYS" should be created on the desktop. It provides
   a GNU-compatible command line interface. Start MSYS and create a
   directory that will contain the MPIR and GMPY source code. C:\src will
   be used for this build. Note that /c/src is the MSYS equivalent of
   C:\src.

   $ mkdir /c/src

5) Download the MPIR source code from www.mpir.org and save it in C:\src.
   For this example, I used mpir-1.3.0-rc3.tar.gz.

6) Download the GMPY source code and save it in C:\src. For this example,
   I used gmpy-1.11rc1.tar.gz.

7) Using MSYS, uncompress GMPY and MPIR, then compile MPIR. The resulting
   files are installed in C:\src.

   $ cd /c/src
   $ gunzip gmpy-1.11rc1.tar.gz
   $ tar -xf gmpy-1.11rc1.tar
   $ gunzip mpir-1.3.0-rc3.tar.gz
   $ tar -xf mpir-1.3.0-rc3.tar
   $ cd mpir-1.3.0
   $ ./configure --prefix=/c/src
   $ make
   $ make install

8) Using the Windows command line, compile GMPY. The instructions assume
   GMPY was uncompressed in step 7.

   > cd C:\src\gmpy-1.11rc1
   > python setup.py build_ext -DMPIR -cmingw32 -Ic:\src\include -Lc:\src\lib install
   > python test\gmpy_test.py

Miscellaneous notes on compiling GMPY

The binaries made available at http://code.google.com/p/gmpy/ are compiled
using MPIR 1.3.0rc3