|
|
|
@ -113,6 +113,7 @@ PACKAGES = {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def detectOS():
|
|
|
|
|
"""Finding out what Operating System is running"""
|
|
|
|
|
if detectOS.result is not None:
|
|
|
|
|
return detectOS.result
|
|
|
|
|
if sys.platform.startswith('openbsd'):
|
|
|
|
@ -132,6 +133,7 @@ detectOS.result = None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def detectOSRelease():
|
|
|
|
|
"""Detecting the release of OS"""
|
|
|
|
|
with open("/etc/os-release", 'r') as osRelease:
|
|
|
|
|
version = None
|
|
|
|
|
for line in osRelease:
|
|
|
|
@ -148,6 +150,7 @@ def detectOSRelease():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def try_import(module, log_extra=False):
|
|
|
|
|
"""Try to import the non imported packages"""
|
|
|
|
|
try:
|
|
|
|
|
return import_module(module)
|
|
|
|
|
except ImportError:
|
|
|
|
@ -208,10 +211,8 @@ def check_sqlite():
|
|
|
|
|
).fetchone()[0]
|
|
|
|
|
logger.info('SQLite Library Source ID: %s', sqlite_source_id)
|
|
|
|
|
if sqlite_version_number >= 3006023:
|
|
|
|
|
compile_options = ', '.join(map(
|
|
|
|
|
lambda row: row[0],
|
|
|
|
|
conn.execute('PRAGMA compile_options;')
|
|
|
|
|
))
|
|
|
|
|
compile_options = ', '.join(
|
|
|
|
|
[row[0] for row in conn.execute('PRAGMA compile_options;')])
|
|
|
|
|
logger.info(
|
|
|
|
|
'SQLite Library Compile Options: %s', compile_options)
|
|
|
|
|
# There is no specific version requirement as yet, so we just
|
|
|
|
@ -230,13 +231,13 @@ def check_sqlite():
|
|
|
|
|
conn.close()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_openssl():
|
|
|
|
|
def check_openssl(): # pylint: disable=too-many-branches, too-many-return-statements
|
|
|
|
|
"""Do openssl dependency check.
|
|
|
|
|
|
|
|
|
|
Here we are checking for openssl with its all dependent libraries
|
|
|
|
|
and version checking.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
# pylint: disable=protected-access, redefined-outer-name
|
|
|
|
|
ctypes = try_import('ctypes')
|
|
|
|
|
if not ctypes:
|
|
|
|
|
logger.error('Unable to check OpenSSL.')
|
|
|
|
@ -300,7 +301,7 @@ def check_openssl():
|
|
|
|
|
' ECDH, and ECDSA enabled.')
|
|
|
|
|
return False
|
|
|
|
|
matches = cflags_regex.findall(openssl_cflags)
|
|
|
|
|
if len(matches) > 0:
|
|
|
|
|
if matches:
|
|
|
|
|
logger.error(
|
|
|
|
|
'This OpenSSL library is missing the following required'
|
|
|
|
|
' features: %s. PyBitmessage requires OpenSSL 0.9.8b'
|
|
|
|
@ -311,13 +312,13 @@ def check_openssl():
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# TODO: The minimum versions of pythondialog and dialog need to be determined
|
|
|
|
|
# ..todo:: The minimum versions of pythondialog and dialog need to be determined
|
|
|
|
|
def check_curses():
|
|
|
|
|
"""Do curses dependency check.
|
|
|
|
|
|
|
|
|
|
Here we are checking for curses if available or not with check
|
|
|
|
|
as interface requires the pythondialog <https://pypi.org/project/pythondialog>
|
|
|
|
|
package and the dialog utility.
|
|
|
|
|
Here we are checking for curses if available or not with check as interface
|
|
|
|
|
requires the `pythondialog <https://pypi.org/project/pythondialog>`_ package
|
|
|
|
|
and the dialog utility.
|
|
|
|
|
"""
|
|
|
|
|
if sys.hexversion < 0x20600F0:
|
|
|
|
|
logger.error(
|
|
|
|
|