You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
2.0 KiB
64 lines
2.0 KiB
# -*- mode: python -*- |
|
|
|
# We don't put these files in to actually include them in the script but to make the Analysis method scan them for imports |
|
a = Analysis(['electrum', 'gui/gui_classic.py', 'gui/gui_lite.py', 'gui/gui_text.py', |
|
'lib/util.py', 'lib/wallet.py', 'lib/simple_config.py', |
|
'lib/bitcoin.py', 'lib/deserialize.py' |
|
], |
|
hiddenimports=["lib","gui"], |
|
pathex=['lib:gui:plugins'], |
|
hookspath=None) |
|
|
|
##### include mydir in distribution ####### |
|
def extra_datas(mydir): |
|
def rec_glob(p, files): |
|
import os |
|
import glob |
|
for d in glob.glob(p): |
|
if os.path.isfile(d): |
|
files.append(d) |
|
rec_glob("%s/*" % d, files) |
|
files = [] |
|
rec_glob("%s/*" % mydir, files) |
|
extra_datas = [] |
|
for f in files: |
|
extra_datas.append((f, f, 'DATA')) |
|
|
|
return extra_datas |
|
########################################### |
|
|
|
# append dirs |
|
|
|
# Theme data |
|
a.datas += extra_datas('data') |
|
|
|
# Localization |
|
a.datas += extra_datas('locale') |
|
|
|
# Py folders that are needed because of the magic import finding |
|
a.datas += extra_datas('gui') |
|
a.datas += extra_datas('lib') |
|
a.datas += extra_datas('plugins') |
|
|
|
pyz = PYZ(a.pure) |
|
exe = EXE(pyz, |
|
a.scripts, |
|
exclude_binaries=1, |
|
name=os.path.join('build\\pyi.win32\\electrum', 'electrum.exe'), |
|
debug=True, |
|
strip=None, |
|
upx=False, |
|
icon='icons/electrum.ico', |
|
console=True) |
|
# The console True makes an annoying black box pop up, but it does make Electrum accept command line options. |
|
|
|
coll = COLLECT(exe, |
|
a.binaries, |
|
a.zipfiles, |
|
a.datas, |
|
strip=None, |
|
upx=True, |
|
debug=False, |
|
icon='icons/electrum.ico', |
|
console=True, |
|
name=os.path.join('dist', 'electrum'))
|
|
|