Add colorama to Pyinstaller spec and requirements.txt

This commit is contained in:
Yun Zheng Hu
2021-12-14 23:46:58 +01:00
parent ad0b4dbcb6
commit 14541748de
3 changed files with 10 additions and 1 deletions

View File

@@ -29,8 +29,15 @@ import collections
from pathlib import Path
# Optionally import colorama to enable colored output for Windows
try:
import colorama
colorama.init()
NO_COLOR = False
except ImportError:
NO_COLOR = True if sys.platform == 'win32' else False
log = logging.getLogger(__name__)
NO_COLOR = False
# Java Archive Extensions
JAR_EXTENSIONS = (".jar", ".war", ".ear")

View File

@@ -5,6 +5,7 @@ block_cipher = None
a = Analysis(['log4j-finder.py'],
hiddenimports=['colorama'],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,

1
requirements.txt Normal file
View File

@@ -0,0 +1 @@
colorama