Skip to content

Commit

Permalink
Merge pull request #4 from jumptrading/windows_support
Browse files Browse the repository at this point in the history
support terminal color on windows
  • Loading branch information
wimglenn authored Feb 1, 2019
2 parents 5c90ddf + b0a5e09 commit d91dbd3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
6 changes: 4 additions & 2 deletions luddite.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
sys.stdout = codecs.getwriter("utf8")(sys.stdout)


__version__ = "1.0.0"
__version__ = "1.0.1"


DEFAULT_FNAME = "requirements.txt"
Expand All @@ -38,6 +38,9 @@
"yellow": "\x1b[33m",
"magenta": "\x1b[35m",
}
if sys.platform == "win32":
import colorama
colorama.init(autoreset=True)


class LudditeError(Exception):
Expand Down Expand Up @@ -214,7 +217,6 @@ def is_index(self):
if part.startswith(pre):
return part[len(pre):]


def process(self, worker, index=None):
if not self.stripped or self.is_index():
return "noop"
Expand Down
9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="luddite",
version="1.0.0",
version="1.0.1",
author="Wim Glenn",
author_email="hey@wimglenn.com",
url="https://github.com/jumptrading/luddite",
Expand All @@ -17,10 +17,13 @@
"Topic :: Utilities",
],
entry_points={"console_scripts": ["luddite=luddite:main"]},
install_requires=["setuptools>=18.0"],
install_requires=[
"setuptools >= 18.0",
'colorama; platform_system == "Windows"',
'futures; python_version < "3.2"',
],
extras_require={
# https://hynek.me/articles/conditional-python-dependencies/
":python_version<'3.2'": ["futures"],
"dev": [
"pytest>=3.6.3",
"pytest-cov",
Expand Down

0 comments on commit d91dbd3

Please sign in to comment.