commit cea705b153d42aa30308a65e14664221a1d31f2d
parent 93a503b07b93ab4b9ca25499981ccb0e15197020
Author: ThomasV <thomasv@electrum.org>
Date: Thu, 10 Aug 2017 16:32:30 +0200
update OSX builds with python3
Diffstat:
2 files changed, 7 insertions(+), 12 deletions(-)
diff --git a/electrum b/electrum
@@ -53,8 +53,7 @@ os.environ['KIVY_DATA_DIR'] = os.path.abspath(os.path.dirname(__file__)) + '/gui
if is_local or is_android:
sys.path.insert(0, os.path.join(script_dir, 'packages'))
elif is_bundle and sys.platform=='darwin':
- # TODO: py3
- sys.path.insert(0, os.getcwd() + "/lib/python2.7/packages")
+ is_local = True
def check_imports():
@@ -77,12 +76,9 @@ def check_imports():
from google.protobuf import reflection
from google.protobuf import descriptor_pb2
from jsonrpclib import SimpleJSONRPCServer
- # check that we have the correct version of ecdsa
- try:
- from ecdsa.ecdsa import curve_secp256k1, generator_secp256k1
- except Exception:
- sys.exit("cannot import ecdsa.curve_secp256k1. You probably need to upgrade ecdsa.\nTry: sudo pip install --upgrade ecdsa")
# make sure that certificates are here
+ if is_bundle and sys.platform=='darwin':
+ requests.utils.DEFAULT_CA_BUNDLE_PATH = os.path.join(os.path.dirname(__file__), 'cacert.pem')
assert os.path.exists(requests.utils.DEFAULT_CA_BUNDLE_PATH)
diff --git a/setup-release.py b/setup-release.py
@@ -28,18 +28,17 @@ if sys.platform == 'darwin':
from plistlib import Plist
plist = Plist.fromFile('Info.plist')
plist.update(dict(CFBundleIconFile='electrum.icns'))
-
- shutil.copy(mainscript, mainscript + '.py')
- mainscript += '.py'
+ shutil.copy(mainscript, 'run_electrum.py')
+ mainscript = 'run_electrum.py'
extra_options = dict(
setup_requires=['py2app'],
app=[mainscript],
options=dict(py2app=dict(argv_emulation=False,
includes=['PyQt4.QtCore', 'PyQt4.QtGui', 'PyQt4.QtWebKit', 'PyQt4.QtNetwork', 'sip'],
- packages=['lib', 'gui.qt', 'plugins'],
+ packages=['lib', 'gui', 'plugins'],
iconfile='electrum.icns',
plist=plist,
- resources=["icons"])),
+ resources=['icons', 'cacert.pem'])),
)
elif sys.platform == 'win32':
extra_options = dict(