forked from iotaledger/pyota-ccurl
-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyota_ccurl.py
33 lines (29 loc) · 829 Bytes
/
pyota_ccurl.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# coding=utf-8
from __future__ import absolute_import, division, print_function, \
unicode_literals
def is_installed():
# type: () -> bool
"""
Returns whether the C extension is installed correctly.
"""
try:
# noinspection PyUnresolvedReferences
from ccurl import Curl as CCurl
except ImportError:
return False
else:
# noinspection PyUnresolvedReferences
from iota.crypto import Curl
return issubclass(Curl, CCurl)
def check_installation():
"""
Outputs a message indicating whether the C extension is installed
correctly.
"""
print(
'Hooray! CCurl is installed correctly!'
if is_installed()
else 'Aww, man! CCurl is NOT installed correctly!'
)
print('For support, visit the #iota-libs-pyota channel on the IOTA Slack.')
print('https://slack.iota.org/')