Mercurial > hg-stable
comparison setup.py @ 7558:dc211ad8d681
setup: warn about missing standard Python components
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 31 Dec 2008 17:59:58 -0600 |
parents | 2fdbf2ccd03a |
children | 9626819b2e3d |
comparison
equal
deleted
inserted
replaced
7557:21233de9c053 | 7558:dc211ad8d681 |
---|---|
6 # 'python setup.py --help' for more options | 6 # 'python setup.py --help' for more options |
7 | 7 |
8 import sys | 8 import sys |
9 if not hasattr(sys, 'version_info') or sys.version_info < (2, 3, 0, 'final'): | 9 if not hasattr(sys, 'version_info') or sys.version_info < (2, 3, 0, 'final'): |
10 raise SystemExit("Mercurial requires python 2.3 or later.") | 10 raise SystemExit("Mercurial requires python 2.3 or later.") |
11 | |
12 # Solaris Python packaging brain damage | |
13 try: | |
14 import hashlib | |
15 sha = hashlib.sha1() | |
16 except: | |
17 try: | |
18 import sha | |
19 except: | |
20 raise SystemExit( | |
21 "Couldn't import standard hashlib (incomplete Python install).") | |
22 | |
23 try: | |
24 import zlib | |
25 except: | |
26 raise SystemExit( | |
27 "Couldn't import standard zlib (incomplete Python install).") | |
11 | 28 |
12 import os | 29 import os |
13 import shutil | 30 import shutil |
14 import tempfile | 31 import tempfile |
15 from distutils.core import setup, Extension | 32 from distutils.core import setup, Extension |