add google protobuf to packages
This commit is contained in:
@@ -7,6 +7,7 @@ recursive-include lib *.py
|
|||||||
recursive-include gui *.py
|
recursive-include gui *.py
|
||||||
recursive-include plugins *.py
|
recursive-include plugins *.py
|
||||||
recursive-include packages *.py
|
recursive-include packages *.py
|
||||||
|
recursive-include packages cacert.pem
|
||||||
include app.fil
|
include app.fil
|
||||||
include icons.qrc
|
include icons.qrc
|
||||||
recursive-include icons *
|
recursive-include icons *
|
||||||
|
|||||||
14
electrum
14
electrum
@@ -32,7 +32,7 @@ is_local = not is_bundle and os.path.dirname(os.path.realpath(__file__)) == os.g
|
|||||||
is_android = 'ANDROID_DATA' in os.environ
|
is_android = 'ANDROID_DATA' in os.environ
|
||||||
|
|
||||||
if is_local:
|
if is_local:
|
||||||
sys.path.append('packages')
|
sys.path.insert(0,'packages')
|
||||||
|
|
||||||
import __builtin__
|
import __builtin__
|
||||||
__builtin__.use_local_modules = is_local or is_android
|
__builtin__.use_local_modules = is_local or is_android
|
||||||
@@ -49,16 +49,22 @@ try:
|
|||||||
import pyasn1_modules
|
import pyasn1_modules
|
||||||
import tlslite
|
import tlslite
|
||||||
import pbkdf2
|
import pbkdf2
|
||||||
|
import google.protobuf
|
||||||
except ImportError as e:
|
except ImportError as e:
|
||||||
sys.exit("Error: %s. Try 'sudo pip install <module-name>'"%e.message)
|
sys.exit("Error: %s. Try 'sudo pip install <module-name>'"%e.message)
|
||||||
|
|
||||||
# these imports must be redeclared for pyinstaller
|
# the following imports are for pyinstaller
|
||||||
import pyasn1.codec
|
import pyasn1.codec
|
||||||
import pyasn1.codec.der
|
import pyasn1.codec.der
|
||||||
from pyasn1.codec.der import encoder, decoder
|
from pyasn1.codec.der import encoder, decoder
|
||||||
from pyasn1_modules import rfc2459
|
from pyasn1_modules import rfc2459
|
||||||
|
from google.protobuf import descriptor
|
||||||
|
from google.protobuf import message
|
||||||
|
from google.protobuf import reflection
|
||||||
|
from google.protobuf import descriptor_pb2
|
||||||
|
|
||||||
# test that we have the correct version of ecdsa
|
|
||||||
|
# check that we have the correct version of ecdsa
|
||||||
try:
|
try:
|
||||||
from ecdsa.ecdsa import curve_secp256k1, generator_secp256k1
|
from ecdsa.ecdsa import curve_secp256k1, generator_secp256k1
|
||||||
except Exception:
|
except Exception:
|
||||||
@@ -79,7 +85,7 @@ from electrum.util import print_msg, print_stderr, print_json, set_verbosity, In
|
|||||||
from electrum.daemon import get_daemon
|
from electrum.daemon import get_daemon
|
||||||
from electrum.plugins import init_plugins
|
from electrum.plugins import init_plugins
|
||||||
|
|
||||||
|
#print_msg("ca_bundle", requests.utils.DEFAULT_CA_BUNDLE_PATH, os.path.exists(requests.utils.DEFAULT_CA_BUNDLE_PATH))
|
||||||
|
|
||||||
# get password routine
|
# get password routine
|
||||||
def prompt_password(prompt, confirm=True):
|
def prompt_password(prompt, confirm=True):
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import requests
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
import paymentrequest_pb2
|
import paymentrequest_pb2
|
||||||
except:
|
except ImportError:
|
||||||
sys.exit("Error: could not find paymentrequest_pb2.py. Create it with 'protoc --proto_path=lib/ --python_out=lib/ lib/paymentrequest.proto'")
|
sys.exit("Error: could not find paymentrequest_pb2.py. Create it with 'protoc --proto_path=lib/ --python_out=lib/ lib/paymentrequest.proto'")
|
||||||
|
|
||||||
import bitcoin
|
import bitcoin
|
||||||
|
|||||||
Reference in New Issue
Block a user