Depend on 'colorama' on Windows to fix color output in terminal (#2606)

Adding the explicit dependency, because

1. 'click' prior to v8.0 did not have this dependency, it was used "only if present"
2. We *are* importing it, let's declare it as such
This commit is contained in:
Oleh Prypin
2021-10-11 19:15:34 +02:00
committed by GitHub
parent e579117efe
commit ba83f90298
3 changed files with 11 additions and 0 deletions

View File

@@ -12,6 +12,15 @@ from mkdocs import utils
from mkdocs import config
from mkdocs.commands import build, gh_deploy, new, serve
if sys.platform.startswith("win"):
try:
import colorama
except ImportError:
pass
else:
colorama.init()
log = logging.getLogger(__name__)

View File

@@ -12,3 +12,4 @@ mkdocs-redirects==1.0.1
importlib_metadata==3.10.0
packaging==20.5
mergedeep==1.3.4
colorama==0.4; platform_system == 'Windows'

View File

@@ -12,3 +12,4 @@ mkdocs-redirects>=1.0.1
importlib_metadata>=3.10
packaging>=20.5
mergedeep>=1.3.4
colorama>=0.4; platform_system == 'Windows'