lbry-desktop/lbrynet/lbry.onefile.spec

69 lines
1.3 KiB
RPMSpec
Raw Normal View History

2017-01-26 12:30:02 -06:00
# -*- mode: python -*-
2017-01-30 23:14:18 +00:00
import platform
import os
2017-01-26 12:30:02 -06:00
import lbryum
2017-01-30 23:14:18 +00:00
cwd = os.getcwd()
if os.path.basename(cwd) != 'lbrynet':
raise Exception('The build needs to be run from the same directory as the spec file')
repo_base = os.path.abspath(os.path.join(cwd, '..'))
system = platform.system()
if system == 'Darwin':
icns = os.path.join(repo_base, 'build', 'icon.icns')
else:
icns = os.path.join(repo_base, 'package', 'icons', '256x256.png')
2017-01-26 12:30:02 -06:00
block_cipher = None
languages = (
'chinese_simplified.txt', 'japanese.txt', 'spanish.txt',
'english.txt', 'portuguese.txt'
)
a = Analysis(
['lbry.py'],
2017-01-30 23:14:18 +00:00
pathex=[cwd],
2017-01-26 12:30:02 -06:00
binaries=None,
datas=[
(
os.path.join(os.path.dirname(lbryum.__file__), 'wordlist', language),
'lbryum/wordlist'
)
for language in languages
],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher
)
pyz = PYZ(
a.pure, a.zipped_data,
cipher=block_cipher
)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name='lbry',
debug=False,
strip=False,
upx=True,
2017-01-30 23:14:18 +00:00
console=False,
icon=icns
2017-01-26 12:30:02 -06:00
)
app = BUNDLE(
exe,
name='lbry.app',
2017-01-30 23:14:18 +00:00
icon=icns,
2017-01-26 12:30:02 -06:00
bundle_identifier=None
)