lbry-sdk/build/cli.onefile.spec

43 lines
992 B
RPMSpec
Raw Normal View History

2017-04-10 21:10:52 +02:00
# -*- mode: python -*-
import platform
import os
dir = 'build';
cwd = os.getcwd()
if os.path.basename(cwd) != dir:
raise Exception('pyinstaller build needs to be run from the ' + dir + ' directory')
repo_base = os.path.abspath(os.path.join(cwd, '..'))
2017-08-02 20:26:58 +02:00
execfile(os.path.join(cwd, "entrypoint.py")) # ghetto import
2017-04-10 21:10:52 +02:00
system = platform.system()
if system == 'Darwin':
icns = os.path.join(repo_base, 'build', 'icon.icns')
elif system == 'Linux':
icns = os.path.join(repo_base, 'build', 'icons', '256x256.png')
elif system == 'Windows':
icns = os.path.join(repo_base, 'build', 'icons', 'lbry256.ico')
else:
print 'Warning: System {} has no icons'.format(system)
icns = None
2017-08-07 22:27:11 +02:00
a = Entrypoint('lbrynet', 'console_scripts', 'lbrynet-cli', pathex=[cwd])
2017-08-02 20:26:58 +02:00
pyz = PYZ(a.pure, a.zipped_data)
2017-04-10 21:10:52 +02:00
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name='lbrynet-cli',
debug=False,
strip=False,
upx=True,
console=True,
icon=icns
)