update OSX builds with python3
This commit is contained in:
10
electrum
10
electrum
@@ -53,8 +53,7 @@ os.environ['KIVY_DATA_DIR'] = os.path.abspath(os.path.dirname(__file__)) + '/gui
|
|||||||
if is_local or is_android:
|
if is_local or is_android:
|
||||||
sys.path.insert(0, os.path.join(script_dir, 'packages'))
|
sys.path.insert(0, os.path.join(script_dir, 'packages'))
|
||||||
elif is_bundle and sys.platform=='darwin':
|
elif is_bundle and sys.platform=='darwin':
|
||||||
# TODO: py3
|
is_local = True
|
||||||
sys.path.insert(0, os.getcwd() + "/lib/python2.7/packages")
|
|
||||||
|
|
||||||
|
|
||||||
def check_imports():
|
def check_imports():
|
||||||
@@ -77,12 +76,9 @@ def check_imports():
|
|||||||
from google.protobuf import reflection
|
from google.protobuf import reflection
|
||||||
from google.protobuf import descriptor_pb2
|
from google.protobuf import descriptor_pb2
|
||||||
from jsonrpclib import SimpleJSONRPCServer
|
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
|
# 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)
|
assert os.path.exists(requests.utils.DEFAULT_CA_BUNDLE_PATH)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -28,18 +28,17 @@ if sys.platform == 'darwin':
|
|||||||
from plistlib import Plist
|
from plistlib import Plist
|
||||||
plist = Plist.fromFile('Info.plist')
|
plist = Plist.fromFile('Info.plist')
|
||||||
plist.update(dict(CFBundleIconFile='electrum.icns'))
|
plist.update(dict(CFBundleIconFile='electrum.icns'))
|
||||||
|
shutil.copy(mainscript, 'run_electrum.py')
|
||||||
shutil.copy(mainscript, mainscript + '.py')
|
mainscript = 'run_electrum.py'
|
||||||
mainscript += '.py'
|
|
||||||
extra_options = dict(
|
extra_options = dict(
|
||||||
setup_requires=['py2app'],
|
setup_requires=['py2app'],
|
||||||
app=[mainscript],
|
app=[mainscript],
|
||||||
options=dict(py2app=dict(argv_emulation=False,
|
options=dict(py2app=dict(argv_emulation=False,
|
||||||
includes=['PyQt4.QtCore', 'PyQt4.QtGui', 'PyQt4.QtWebKit', 'PyQt4.QtNetwork', 'sip'],
|
includes=['PyQt4.QtCore', 'PyQt4.QtGui', 'PyQt4.QtWebKit', 'PyQt4.QtNetwork', 'sip'],
|
||||||
packages=['lib', 'gui.qt', 'plugins'],
|
packages=['lib', 'gui', 'plugins'],
|
||||||
iconfile='electrum.icns',
|
iconfile='electrum.icns',
|
||||||
plist=plist,
|
plist=plist,
|
||||||
resources=["icons"])),
|
resources=['icons', 'cacert.pem'])),
|
||||||
)
|
)
|
||||||
elif sys.platform == 'win32':
|
elif sys.platform == 'win32':
|
||||||
extra_options = dict(
|
extra_options = dict(
|
||||||
|
|||||||
Reference in New Issue
Block a user