Added package fallback and suppressed pylint relative-import warning

This commit is contained in:
Dmitri Bogomolov 2019-04-22 13:38:39 +03:00
parent 0d7b3a3823
commit 38f36d7860
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13
2 changed files with 5 additions and 5 deletions

View File

@ -64,12 +64,13 @@ if __name__ == "__main__":
'pybitmessage', 'pybitmessage',
'pybitmessage.bitmessageqt', 'pybitmessage.bitmessageqt',
'pybitmessage.bitmessagecurses', 'pybitmessage.bitmessagecurses',
'pybitmessage.fallback',
'pybitmessage.messagetypes', 'pybitmessage.messagetypes',
'pybitmessage.network', 'pybitmessage.network',
'pybitmessage.plugins',
'pybitmessage.pyelliptic', 'pybitmessage.pyelliptic',
'pybitmessage.socks', 'pybitmessage.socks',
'pybitmessage.storage', 'pybitmessage.storage'
'pybitmessage.plugins'
] ]
# this will silently accept alternative providers of msgpack # this will silently accept alternative providers of msgpack
@ -84,8 +85,7 @@ if __name__ == "__main__":
import umsgpack import umsgpack
installRequires.append("umsgpack") installRequires.append("umsgpack")
except ImportError: except ImportError:
packages += [ packages += ['pybitmessage.fallback.umsgpack']
'pybitmessage.fallback', 'pybitmessage.fallback.umsgpack']
dist = setup( dist = setup(
name='pybitmessage', name='pybitmessage',

View File

@ -165,7 +165,7 @@ def try_import(module, log_extra=False):
def check_ripemd160(): def check_ripemd160():
"""Check availability of the RIPEMD160 hash function""" """Check availability of the RIPEMD160 hash function"""
try: try:
from fallback import RIPEMD160Hash from fallback import RIPEMD160Hash # pylint: disable=relative-import
except ImportError: except ImportError:
return False return False
return RIPEMD160Hash is not None return RIPEMD160Hash is not None