Unify module checks with package checks

This commit is contained in:
Bastian Germann 2018-10-08 10:10:02 +02:00
parent 5f23d3adea
commit cbb5afa049
1 changed files with 13 additions and 16 deletions

View File

@ -42,9 +42,9 @@ VERS = {
'Python': '3.6', 'Python': '3.6',
'PyQt5': '5.0', 'PyQt5': '5.0',
'Qt5': '5.0', 'Qt5': '5.0',
'pymediainfo': '2.2',
'sqlalchemy': '0.5', 'sqlalchemy': '0.5',
# pyenchant 1.6 required on Windows 'enchant': '1.6'
'enchant': '1.6' if IS_WIN else '1.3'
} }
# pywin32 # pywin32
@ -52,7 +52,6 @@ WIN32_MODULES = [
'win32com', 'win32com',
'win32ui', 'win32ui',
'pywintypes', 'pywintypes',
'pyodbc',
'icu', 'icu',
] ]
@ -82,17 +81,12 @@ MODULES = [
'appdirs', 'appdirs',
'sqlalchemy', 'sqlalchemy',
'alembic', 'alembic',
'sqlite3',
'lxml', 'lxml',
'chardet', 'chardet',
'enchant',
'bs4', 'bs4',
'mako', 'mako',
'uno',
'websockets', 'websockets',
'asyncio',
'waitress', 'waitress',
'six',
'webob', 'webob',
'requests', 'requests',
'qtawesome' 'qtawesome'
@ -100,12 +94,16 @@ MODULES = [
OPTIONAL_MODULES = [ OPTIONAL_MODULES = [
('mysql.connector', '(MySQL support)', True), ('mysql.connector', '(MySQL support)'),
('psycopg2', '(PostgreSQL support)', True), ('pyodbc', '(ODBC support)'),
('nose2', '(testing framework)', True), ('psycopg2', '(PostgreSQL support)'),
('mock', '(testing module)', sys.version_info[1] < 3), ('jenkins', '(access jenkins api - package name: jenkins-webapi)'),
('jenkins', '(access jenkins api - package name: jenkins-webapi)', True), ('enchant', '(spell checker)'),
('pysword', '(import SWORD bibles)', True), ('pysword', '(import SWORD bibles)'),
('uno', '(LibreOffice/OpenOffice support)'),
# development/testing modules
('nose2', '(testing framework)'),
('pylint', '(linter)')
] ]
w = sys.stdout.write w = sys.stdout.write
@ -234,8 +232,7 @@ def main():
check_module(m) check_module(m)
print('Checking for optional modules...') print('Checking for optional modules...')
for m in OPTIONAL_MODULES: for m in OPTIONAL_MODULES:
if m[2]: check_module(m[0], text=m[1])
check_module(m[0], text=m[1])
if IS_WIN: if IS_WIN:
print('Checking for Windows specific modules...') print('Checking for Windows specific modules...')
for m in WIN32_MODULES: for m in WIN32_MODULES: