Allow Python 3.
This commit is contained in:
parent
6f9b66ddff
commit
7c66577671
|
@ -7,10 +7,10 @@ import sys
|
|||
|
||||
# Only really old versions of Python don't have sys.hexversion. We don't
|
||||
# support them. The logging module was introduced in Python 2.3
|
||||
if not hasattr(sys, 'hexversion') or sys.hexversion < 0x20300F0:
|
||||
if not hasattr(sys, 'hexversion'):
|
||||
sys.exit(
|
||||
'Python version: %s\n'
|
||||
'PyBitmessage requires Python 2.7.4 or greater (but not Python 3)'
|
||||
'PyBitmessage requires Python 2.7.4 or greater'
|
||||
% sys.version
|
||||
)
|
||||
|
||||
|
@ -410,19 +410,12 @@ def check_dependencies(verbose=False, optional=False):
|
|||
|
||||
# Python 2.7.4 is the required minimum.
|
||||
# (https://bitmessage.org/forum/index.php?topic=4081.0)
|
||||
# Python 3+ is not supported, but it is still useful to provide
|
||||
# information about our other requirements.
|
||||
logger.info('Python version: %s', sys.version)
|
||||
if sys.hexversion < 0x20704F0:
|
||||
logger.error(
|
||||
'PyBitmessage requires Python 2.7.4 or greater'
|
||||
' (but not Python 3+)')
|
||||
has_all_dependencies = False
|
||||
if sys.hexversion >= 0x3000000:
|
||||
logger.error(
|
||||
'PyBitmessage does not support Python 3+. Python 2.7.4'
|
||||
' or greater is required. Python 2.7.18 is recommended.')
|
||||
sys.exit()
|
||||
|
||||
check_functions = [check_ripemd160, check_sqlite, check_openssl]
|
||||
if optional:
|
||||
|
|
Loading…
Reference in New Issue
Block a user