Add clint as a dependency.
Since clint 0.3, it supports Python 3.
This commit is contained in:
parent
c5e2fd955f
commit
94362e903d
44
hy/errors.py
44
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
|
||||
|
2
setup.py
2
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')
|
||||
|
Loading…
Reference in New Issue
Block a user