PageRenderTime 30ms CodeModel.GetById 25ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

/vs2010_build.txt

http://gmpy.googlecode.com/
Plain Text | 82 lines | 61 code | 21 blank | 0 comment | 0 complexity | 53ab554507abd80c8885e79420819748 MD5 | raw file
 1Building GMPY2 on Windows
 2=========================
 3
 4Note 1
 5------
 6Visual Studio 2010 is used to compile GMPY2. Since no objects that use the C
 7runtime are passed between Python and GMPY2, there shouldn't be any issues
 8using a different compiler. (At least, I think so....)
 9
10Note 2
11------
12To avoid creating a large number of spurious errors, it's best to disable
13parallel builds in Visual Studio. To change this option, goto
14"Tools">"Options">"Projects and Solutions">"Build and Run".
15
161) Download and unzip MPIR. To follow these instructions, the unzipped files
17   should be located in C:\src\mpir. Follow the instructions in:
18      C:\src\mpir\build.vc10\readme.txt
19
202) Download and unzip MPFR. To follow these instructions, the unzipped files
21   should be located in C:\src\mpfr.
22
233) Download and install the VS 2010 solution files for MPFR from:
24      http://gladman.plushost.co.uk/oldsite/computing/gmp4win.php
25
264) Create the following directories:
27
28   > mkdir c:\src\32
29   > mkdir c:\src\32\lib
30   > mkdir c:\src\32\include
31   > mkdir c:\src\64
32   > mkdir c:\src\64\lib
33   > mkdir c:\src\64\include
34
355) Download and unzip GMPY2. To follow these instructions, the unzipped files
36   should be located in C:\src\gmpy2-2.0.0a2.
37
386) Open C:\src\mpir\build.vc10\mpir.sln. Choose "Release"/"Win32" or
39   "Release"/"x64" as appropriate. Then use "Build">"Configuration Manager"
40   to select the desired CPU option. Then "Build Solution". Copy the library
41   files to C:\src\32 or C:\src\64.
42
43   For 32-bit build
44   > copy c:\src\mpir\build.vc10\lib\Win32\Release\mpir.??b c:\src\32\lib
45   > copy c:\src\mpir\build.vc10\lib\Win32\Release\mpir.h c:\src\32\include
46
47   For 64-bit build
48   > copy c:\src\mpir\build.vc10\lib\x64\Release\mpir.??b c:\src\64\lib
49   > copy c:\src\mpir\build.vc10\lib\x64\Release\mpir.h c:\src\64\include
50
517) Open C:\src\mpfr\build.vc10\lib_mpfr.sln. Choose "Release"/"Win32" or
52   "Release"/"x64" and then "Build Solution". Copy the library files to
53   C:\src\32 or C:\src\64.
54
55   For 32-bit build
56   > copy c:\src\mpfr\build.vc10\lib\Win32\Release\mpfr.??b c:\src\32\lib
57   > copy c:\src\mpfr\mpfr.h c:\src\32\include
58
59   For 64-bit build
60   > copy c:\src\mpfr\build.vc10\lib\x64\Release\mpfr.??b c:\src\64\lib
61   > copy c:\src\mpfr\mpfr.h c:\src\64\include
62
638) The final compilation of GMPY2 is done from the command prompt.
64
65   1a) Configure the environment for 64-bit builds.
66   "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\vcvars64.bat"
67
68   1b) Configure the environment for 32-bit builds.
69   "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat"
70
71   2) Convince setup.py to use the SDK tools.
72   set MSSdk=1
73   set DISTUTILS_USE_SDK=1
74
75   3) Build and install gmpy2.
76   python setup.py build_ext -Ddir=c:\src\32 install
77
78   -- or --
79   python setup.py build_ext -Ddir=c:\src\64 install
80
81   4) (Optional) Build an installer.
82   python setup.py bdist_wininst