Show More
@@ -4,7 +4,7 b'' | |||
|
4 | 4 | # 'python setup.py install', or |
|
5 | 5 | # 'python setup.py --help' for more options |
|
6 | 6 | |
|
7 | import sys | |
|
7 | import sys, platform | |
|
8 | 8 | if not hasattr(sys, 'version_info') or sys.version_info < (2, 4, 0, 'final'): |
|
9 | 9 | raise SystemExit("Mercurial requires Python 2.4 or later.") |
|
10 | 10 | |
@@ -36,11 +36,21 b' except:' | |||
|
36 | 36 | raise SystemExit( |
|
37 | 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 | |
|
39 | 41 | try: |
|
40 | import bz2 | |
|
42 | isironpython = platform.python_implementation().lower().find("ironpython") != -1 | |
|
41 | 43 | except: |
|
42 | raise SystemExit( | |
|
43 | "Couldn't import standard bz2 (incomplete Python install).") | |
|
44 | pass | |
|
45 | ||
|
46 | if isironpython: | |
|
47 | print "warning: IronPython detected (no bz2 support)" | |
|
48 | else: | |
|
49 | try: | |
|
50 | import bz2 | |
|
51 | except: | |
|
52 | raise SystemExit( | |
|
53 | "Couldn't import standard bz2 (incomplete Python install).") | |
|
44 | 54 | |
|
45 | 55 | import os, subprocess, time |
|
46 | 56 | import shutil |
General Comments 0
You need to be logged in to leave comments.
Login now