File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ def __init__(self,
98
98
self .only_show_errors = self .config .getboolean ('core' , 'only_show_errors' , fallback = False )
99
99
self .enable_color = self ._should_enable_color ()
100
100
# Init colorama only in Windows legacy terminal
101
- self ._should_init_colorama = self .enable_color and os . name == 'nt ' and not is_modern_terminal ()
101
+ self ._should_init_colorama = self .enable_color and sys . platform == 'win32 ' and not is_modern_terminal ()
102
102
103
103
@staticmethod
104
104
def _should_show_version (args ):
Original file line number Diff line number Diff line change 5
5
# Licensed under the MIT License. See License.txt in the project root for license information.
6
6
# --------------------------------------------------------------------------------------------
7
7
8
- from codecs import open
9
- from setuptools import setup , find_packages
8
+ import sys
9
+ from setuptools import setup
10
10
11
11
VERSION = '0.8.2'
12
12
13
13
DEPENDENCIES = [
14
14
'argcomplete' ,
15
- 'colorama' ,
16
15
'jmespath' ,
17
16
'pygments' ,
18
17
'pyyaml' ,
19
18
'tabulate'
20
19
]
21
20
22
- with open ('README.rst' , 'r' , encoding = 'utf-8' ) as f :
21
+ # On Windows, colorama is required for legacy terminals.
22
+ if sys .platform == 'win32' :
23
+ DEPENDENCIES .append ('colorama' )
24
+
25
+ with open ('README.rst' , 'r' ) as f :
23
26
README = f .read ()
24
27
25
28
setup (
You can’t perform that action at this time.
0 commit comments