forked from holgern/beem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
beempy-onefile.spec
58 lines (52 loc) · 1.78 KB
/
beempy-onefile.spec
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
# -*- mode: python -*-
import os
import glob
import platform
from PyInstaller.utils.hooks import exec_statement
import websocket
import certifi
from os.path import join, dirname, basename
block_cipher = None
os_name = platform.system()
binaries = []
websocket_lib_path = dirname(certifi.__file__)
websocket_cacert_file_path = join(websocket_lib_path, 'cacert.pem')
analysis_data = [
# For websocket library to find "cacert.pem" file, it must be in websocket
# directory inside of distribution directory.
# This line can be removed once PyInstaller adds hook-websocket.py
(websocket_cacert_file_path, join('.', basename(websocket_lib_path)))
]
a = Analysis(['beem/cli.py'],
pathex=['beem'],
binaries=binaries,
datas=analysis_data,
hiddenimports=['scrypt', '_scrypt', 'websocket', 'pylibscrypt', 'cffi', 'cryptography.hazmat.backends.openssl', 'cryptography'],
hookspath=[],
runtime_hooks=[],
excludes=['matplotlib', 'scipy', 'pandas', 'numpy', 'PyQt5', 'tkinter'],
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='beempy',
debug=False,
strip=False,
upx=False,
runtime_tmpdir=None,
console=True,
icon='beempy.ico',
)
if platform.system() == 'Darwin':
info_plist = {'NSHighResolutionCapable': 'True', 'NSPrincipalClass': 'NSApplication'}
app = BUNDLE(exe,
name='beempy.app',
icon='beempy.ico',
bundle_identifier=None
)