mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
Only install colorama on windows
This commit is contained in:
parent
777eb38852
commit
3f9d9bf84f
2 changed files with 5 additions and 0 deletions
|
@ -8,6 +8,8 @@ import keyring
|
|||
import pytz
|
||||
try: import simplejson as json
|
||||
except ImportError: import json
|
||||
if "win32" in sys.platform:
|
||||
import colorama
|
||||
import re
|
||||
import tempfile
|
||||
import subprocess
|
||||
|
@ -141,5 +143,7 @@ def get_text_from_editor(config, template=""):
|
|||
|
||||
def colorize(string):
|
||||
"""Returns the string wrapped in cyan ANSI escape"""
|
||||
if "win32" in sys.platform:
|
||||
return colorama.Fore.CYAN + string + colorama.Fore.RESET
|
||||
return u"\033[36m{}\033[39m".format(string)
|
||||
|
||||
|
|
1
setup.py
1
setup.py
|
@ -60,6 +60,7 @@ def get_version(filename="jrnl/__init__.py"):
|
|||
|
||||
conditional_dependencies = {
|
||||
"pyreadline>=2.0": "win32" in sys.platform,
|
||||
"colorama>=0.2.5": "win32" in sys.platform,
|
||||
"argparse==1.2.1": sys.version.startswith("2.6")
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue