forked from spesmilo/electrum
-
Notifications
You must be signed in to change notification settings - Fork 64
/
setup-release.py
71 lines (60 loc) · 1.85 KB
/
setup-release.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
"""
py2app build script for Electrum Bitcoin Private
Usage (Mac OS X):
python setup.py py2app
"""
from setuptools import setup
from plistlib import Plist
import requests
import os
import shutil
from lib.version import ELECTRUM_VERSION as version
CERT_PATH = requests.certs.where()
name = "Electrum ZCL"
mainscript = 'electrum-zcl'
plist = Plist.fromFile('Info.plist')
plist.update(dict(CFBundleIconFile='icons/electrum.icns'))
os.environ["REQUESTS_CA_BUNDLE"] = "cacert.pem"
shutil.copy(mainscript, mainscript + '.py')
mainscript += '.py'
extra_options = dict(
setup_requires=['py2app'],
app=[mainscript],
packages=[
'electrum-zcl',
'electrum-zcl_gui',
'electrum-zcl_gui.qt',
'electrum-zcl_plugins',
'electrum-zcl_plugins.audio_modem',
'electrum-zcl_plugins.cosigner_pool',
'electrum-zcl_plugins.email_requests',
'electrum-zcl_plugins.greenaddress_instant',
'electrum-zcl_plugins.hw_wallet',
'electrum-zcl_plugins.keepkey',
'electrum-zcl_plugins.labels',
'electrum-zcl_plugins.ledger',
'electrum-zcl_plugins.trezor',
'electrum-zcl_plugins.digitalbitbox',
'electrum-zcl_plugins.trustedcoin',
'electrum-zcl_plugins.virtualkeyboard',
],
package_dir={
'electrum-zcl': 'lib',
'electrum-zcl_gui': 'gui',
'electrum-zcl_plugins': 'plugins'
},
data_files=[CERT_PATH],
options=dict(py2app=dict(argv_emulation=False,
includes=['sip'],
packages=['lib', 'gui', 'plugins'],
iconfile='icons/electrum.icns',
plist=plist,
resources=["icons"])),
)
setup(
name=name,
version=version,
**extra_options
)
# Remove the copied py file
os.remove(mainscript)