equal
deleted
inserted
replaced
21 |
21 |
22 # Solaris Python packaging brain damage |
22 # Solaris Python packaging brain damage |
23 try: |
23 try: |
24 import hashlib |
24 import hashlib |
25 sha = hashlib.sha1() |
25 sha = hashlib.sha1() |
26 except: |
26 except ImportError: |
27 try: |
27 try: |
28 import sha |
28 import sha |
29 except: |
29 except ImportError: |
30 raise SystemExit( |
30 raise SystemExit( |
31 "Couldn't import standard hashlib (incomplete Python install).") |
31 "Couldn't import standard hashlib (incomplete Python install).") |
32 |
32 |
33 try: |
33 try: |
34 import zlib |
34 import zlib |
35 except: |
35 except ImportError: |
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 |
39 # The base IronPython distribution (as of 2.7.1) doesn't support bz2 |
40 isironpython = False |
40 isironpython = False |
41 try: |
41 try: |
42 isironpython = (platform.python_implementation() |
42 isironpython = (platform.python_implementation() |
43 .lower().find("ironpython") != -1) |
43 .lower().find("ironpython") != -1) |
44 except: |
44 except AttributeError: |
45 pass |
45 pass |
46 |
46 |
47 if isironpython: |
47 if isironpython: |
48 sys.stderr.write("warning: IronPython detected (no bz2 support)\n") |
48 sys.stderr.write("warning: IronPython detected (no bz2 support)\n") |
49 else: |
49 else: |
50 try: |
50 try: |
51 import bz2 |
51 import bz2 |
52 except: |
52 except ImportError: |
53 raise SystemExit( |
53 raise SystemExit( |
54 "Couldn't import standard bz2 (incomplete Python install).") |
54 "Couldn't import standard bz2 (incomplete Python install).") |
55 |
55 |
56 import os, subprocess, time |
56 import os, subprocess, time |
57 import shutil |
57 import shutil |