Mercurial > hg-stable
changeset 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 | 21233de9c053 |
children | 016a7319e76b |
files | setup.py |
diffstat | 1 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/setup.py Sat Dec 27 19:05:26 2008 +0100 +++ b/setup.py Wed Dec 31 17:59:58 2008 -0600 @@ -9,6 +9,23 @@ if not hasattr(sys, 'version_info') or sys.version_info < (2, 3, 0, 'final'): raise SystemExit("Mercurial requires python 2.3 or later.") +# Solaris Python packaging brain damage +try: + import hashlib + sha = hashlib.sha1() +except: + try: + import sha + except: + raise SystemExit( + "Couldn't import standard hashlib (incomplete Python install).") + +try: + import zlib +except: + raise SystemExit( + "Couldn't import standard zlib (incomplete Python install).") + import os import shutil import tempfile