-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPYINSTALL.txt
150 lines (124 loc) · 3.56 KB
/
PYINSTALL.txt
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
## ======================================================================
## Python module install instructions
## ======================================================================
## ------------------
## Build the module
## ------------------
python setup.py build
#
# THREAD LOCAL CONTEXTS:
#
# For compatibility with decimal.py, automatic thread local contexts
# are enabled by default. It is possible to build a NON-COMPATIBLE
# version that uses a single global default context. This version is
# 8-16% faster:
#
# python setup.py build --without-threads
#
# There are many ways to avoid the global default context, so it
# is still possible to use threads if the usual precautions are
# observed.
#
#
# TROUBLESHOOTING:
#
# setup.py runs ./configure to detect the optimal configuration. If
# ./configure guesses incorrectly, a specific configuration can be
# enforced by passing the --with-machine parameter to setup.py.
#
# Example:
#
# python setup.py build --with-machine=ansi32
#
# Possible values (in decreasing order of preference):
#
# 1. x64 - 64-bit Python, x86_64 processor (AMD, Intel)
#
# 2. uint128 - 64-bit Python, compiler provides __uint128_t (gcc)
#
# 3. ansi64 - 64-bit Python, ANSI C
#
# 4. ppro - 32-bit Python, x86 CPU, PentiumPro or later
#
# 5. ansi32 - 32-bit Python, ANSI C
#
# 6. ansi-legacy - 32-bit Python, compiler without uint64_t
#
## -----------------
## Test the module
## -----------------
#
# Get the tests (requires hg):
#
# Most of the tests do not have a redistribution license, so
# they are not included in mpdecimal.
#
# It is vital to use the 'decimaltestdata' directory from the
# cpython default branch. Earlier versions (especially 2.5) of
# this directory may contain bugs, causing several tests to fail.
#
# Since mercurial does not support directory checkouts, the
# checkout procedure is highly awkward.
cd python && ./gettests.sh # gettests.bat
#
# Official regression tests:
#
# Python-2.5.x: test_cdecimal2.5.py
# Python-2.6.x: test_cdecimal2.py
# Python-2.7.x: test_cdecimal2.py
# Python-3.1.x: test_cdecimal3.py
# Python-3.2.x: test_cdecimal3.py
# Python-3.3.x: test_cdecimal3.py
#
python test_cdecimal2.py # test_cdecimal2.5.py test_cdecimal3.py
#
# Tests against decimal.py:
#
# Note for Python 2.5.0 through 2.5.4: decimal.py contains several bugs
# that make the tests impractical to run. It is recommended to upgrade
# to Python 2.5.5 or 2.6.6.
#
# Python-2.x:
python deccheck2.py
python ctx-deccheck2.py
# Python-3.x:
python deccheck3.py
## -----------------------
## Long tests (optional)
## -----------------------
# Very long tests (several days):
python deccheck2.py --long
python ctx-deccheck2.py --long
# Extremely long tests (several weeks):
python deccheck2.py --all
python ctx-deccheck2.py --all
## ---------------
## Test failures
## ---------------
#
# 1) Make sure that you have 'decimaltestdata' from the cpython
# default branch.
#
# 2) The author runs all long tests against these hg branches:
#
# 2.5
# 2.6
# 2.7
# 3.1
# 3.2
# default
#
# Earlier micro versions (say 2.6.1 vs 2.6.6) often have bugs
# in decimal.py. deccheck tries to skip known issues, but the
# list might not be complete.
#
# Please consider testing against the latest micro release
# before reporting a bug.
#
# 3) Though rare, compiler bugs are a possibility. For example,
# recently a workaround for a bug in gcc-4.5.x was added.
#
## ---------
## Install
## ---------
python setup.py install