##// END OF EJS Templates
setup.py: workaround for missing bz2 module in IronPython...
Zachary Gramana -
r14295:bb7e3b3e default
parent child Browse files
Show More
@@ -4,7 +4,7 b''
4 # 'python setup.py install', or
4 # 'python setup.py install', or
5 # 'python setup.py --help' for more options
5 # 'python setup.py --help' for more options
6
6
7 import sys
7 import sys, platform
8 if not hasattr(sys, 'version_info') or sys.version_info < (2, 4, 0, 'final'):
8 if not hasattr(sys, 'version_info') or sys.version_info < (2, 4, 0, 'final'):
9 raise SystemExit("Mercurial requires Python 2.4 or later.")
9 raise SystemExit("Mercurial requires Python 2.4 or later.")
10
10
@@ -36,6 +36,16 b' except:'
36 raise SystemExit(
36 raise SystemExit(
37 "Couldn't import standard zlib (incomplete Python install).")
37 "Couldn't import standard zlib (incomplete Python install).")
38
38
39 # The base IronPython distribution (as of 2.7.1) doesn't support bz2
40 isironpython = False
41 try:
42 isironpython = platform.python_implementation().lower().find("ironpython") != -1
43 except:
44 pass
45
46 if isironpython:
47 print "warning: IronPython detected (no bz2 support)"
48 else:
39 try:
49 try:
40 import bz2
50 import bz2
41 except:
51 except:
General Comments 0
You need to be logged in to leave comments. Login now