Commit 2dab3dbb authored by Bram Schoenmakers's avatar Bram Schoenmakers

Merge pull request #49 from MinchinWeb/windows-cmd-2

Windows cmd 2 -- add color to output on Windows
parents dfb8dd77 9650361b
*.pyc
*.sw?
build
dist
install
.coverage
# Distribution / packaging
.Python
env/
env*/
build/
develop-eggs/
dist/
eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
# Sublime Text
*.sublime-*
sudo: false # run on new infrastructure
language: python
python:
- "2.7"
......@@ -9,6 +10,10 @@ install:
- "pip install icalendar"
- "pip install pylint"
script: "./run-tests.sh"
# Cache Dependencies
cache:
directories:
- $HOME/travis/.cache/pip
notifications:
webhooks:
urls:
......
from setuptools import setup, find_packages
import os
import re
import codecs
import sys
here = os.path.abspath(os.path.dirname(__file__))
def read(*parts):
# intentionally *not* adding an encoding option to open
return codecs.open(os.path.join(here, *parts), 'r').read()
def find_version(*file_paths):
version_file = read(*file_paths)
version_match = re.search(r"^VERSION = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
conditional_dependencies = {
"colorama>=0.2.5": "win32" in sys.platform,
}
setup(
name = "topydo",
packages = find_packages(exclude=["test"]),
version = "0.5",
version = find_version('topydo', 'lib', 'Version.py'),
description = "A command-line todo list application using the todo.txt format.",
author = "Bram Schoenmakers",
author_email = "me@bramschoenmakers.nl",
url = "https://github.com/bram85/topydo",
install_requires = [
'six >= 1.9.0',
],
] + [p for p, cond in conditional_dependencies.items() if cond],
extras_require = {
'ical': ['icalendar'],
'prompt-toolkit': ['prompt-toolkit >= 0.39'],
......
......@@ -20,6 +20,10 @@ import sys
import getopt
from topydo.cli.CLIApplicationBase import MAIN_OPTS, error
from topydo.cli.CLI import CLIApplication
# enable color on windows CMD
if "win32" in sys.platform:
import colorama
colorama.init()
def main():
""" Main entry point of the CLI. """
......
......@@ -78,7 +78,7 @@ class ListCommand(ExpressionCommand):
Prints the todos in the right format.
Defaults to normal text output (with possible colors and other pretty
printing. If a format was specified on the commandline, this format is
printing). If a format was specified on the commandline, this format is
sent to the output.
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment