summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshimizukawa <shimizukawa@gmail.com>2014-07-05 01:39:13 +0900
committershimizukawa <shimizukawa@gmail.com>2014-07-05 01:39:13 +0900
commit4bf71bf3df8b59d242bf291d2b3442b004013c47 (patch)
treee140c38aa69ae616b07d4dc6517310540cf65c7c
parent67d66af4700d5468c82b5ebb6b6bfa25fd43ad49 (diff)
downloadsphinx-4bf71bf3df8b59d242bf291d2b3442b004013c47.tar.gz
Update documentation and `sphinx-build -N` option behavior for windows color console support. closes #1291.
-rw-r--r--CHANGES2
-rw-r--r--doc/invocation.rst3
-rw-r--r--sphinx/cmdline.py1
-rw-r--r--sphinx/setup_command.py1
-rw-r--r--sphinx/util/console.py2
5 files changed, 4 insertions, 5 deletions
diff --git a/CHANGES b/CHANGES
index 4d9a68c0..a9641c96 100644
--- a/CHANGES
+++ b/CHANGES
@@ -39,7 +39,7 @@ New features
submodule documentation. Thanks to Wes Turner and Luc Saffre.
* #1434: Provide non-minified JS files for jquery.js and underscore.js to
clarify the source of the minified files.
-* PR#252: Windows color console support. Thanks to meu31.
+* PR#252, #1291: Windows color console support. Thanks to meu31.
Bugs fixed
----------
diff --git a/doc/invocation.rst b/doc/invocation.rst
index 206fd200..d347f507 100644
--- a/doc/invocation.rst
+++ b/doc/invocation.rst
@@ -154,8 +154,7 @@ The :program:`sphinx-build` script has several options:
.. option:: -N
- Do not emit colored output. (On Windows, colored output is disabled in any
- case.)
+ Do not emit colored output.
.. option:: -v
diff --git a/sphinx/cmdline.py b/sphinx/cmdline.py
index 6e94ffbe..6e7ab326 100644
--- a/sphinx/cmdline.py
+++ b/sphinx/cmdline.py
@@ -82,7 +82,6 @@ Standard options
def main(argv):
if not color_terminal():
- # Windows' poor cmd box doesn't understand ANSI sequences
nocolor()
# parse options
diff --git a/sphinx/setup_command.py b/sphinx/setup_command.py
index 8ed17113..0356073a 100644
--- a/sphinx/setup_command.py
+++ b/sphinx/setup_command.py
@@ -138,7 +138,6 @@ class BuildDoc(Command):
def run(self):
if not color_terminal():
- # Windows' poor cmd box doesn't understand ANSI sequences
nocolor()
if not self.verbose:
status_stream = StringIO()
diff --git a/sphinx/util/console.py b/sphinx/util/console.py
index 64eb4e47..2acc8ead 100644
--- a/sphinx/util/console.py
+++ b/sphinx/util/console.py
@@ -64,6 +64,8 @@ def color_terminal():
def nocolor():
+ if sys.platform == 'win32' and colorama is not None:
+ colorama.deinit()
codes.clear()
def coloron():