diff --git a/hy/errors.py b/hy/errors.py index 439d493..5f8e562 100644 --- a/hy/errors.py +++ b/hy/errors.py @@ -21,10 +21,12 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. -from hy._compat import PY3 - import traceback +from clint.textui import colored + +from hy._compat import PY3 + class HyError(Exception): """ @@ -34,44 +36,6 @@ class HyError(Exception): pass -try: - from clint.textui import colored -except Exception: - class colored: - - @staticmethod - def black(foo): - return foo - - @staticmethod - def red(foo): - return foo - - @staticmethod - def green(foo): - return foo - - @staticmethod - def yellow(foo): - return foo - - @staticmethod - def blue(foo): - return foo - - @staticmethod - def magenta(foo): - return foo - - @staticmethod - def cyan(foo): - return foo - - @staticmethod - def white(foo): - return foo - - class HyCompileError(HyError): def __init__(self, exception, traceback=None): self.exception = exception diff --git a/setup.py b/setup.py index cf6af5b..1a1f65c 100755 --- a/setup.py +++ b/setup.py @@ -45,7 +45,7 @@ long_description = """Hy is a Python <--> Lisp layer. It helps make things work nicer, and lets Python and the Hy lisp variant play nice together. """ -install_requires = ['rply>=0.7.0', 'astor>=0.3'] +install_requires = ['rply>=0.7.0', 'astor>=0.3', 'clint>=0.4'] if sys.version_info[:2] < (2, 7): install_requires.append('argparse>=1.2.1') install_requires.append('importlib>=1.0.2')