-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
RNAlysis.spec
98 lines (86 loc) · 2.72 KB
/
RNAlysis.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# -*- mode: python ; coding: utf-8 -*-
from pathlib import Path
from PyInstaller.compat import is_darwin
from PyInstaller.utils.hooks import collect_submodules, collect_data_files
from _pyinstaller_hooks_contrib import get_hook_dirs
datas = []
binaries = []
hiddenimports = []
tmp_collection = collect_data_files('rnalysis')
for item in tmp_collection:
if 'videos' in item[0]:
continue
datas.append(item)
datas += collect_data_files('pyvis')
hiddenimports += collect_submodules('sklearn')
hiddenimports += collect_submodules('cutadapt')
hiddenimports += collect_submodules('pyarrow')
hiddenimports += collect_submodules('numpy')
hiddenimports += collect_submodules('scipy')
hiddenimports += collect_submodules('polars')
hiddenimports += ['matplotlib.backends.backend_pdf', 'matplotlib.backends.backend_svg',
'matplotlib.backends.backend_agg', 'matplotlib.backends.backend_pgf',
'matplotlib.backends.backend_ps']
with open(Path(get_hook_dirs()[0]).joinpath('hook-pygraphviz.py')) as infile:
hook_path = Path('hooks')
hook_path.mkdir()
with open(hook_path.joinpath('hook-graphviz.py'), 'w') as outfile:
outfile.write(infile.read())
block_cipher = None
a = Analysis(
['rnalysis_app.py'],
pathex=[],
binaries=binaries,
datas=datas,
hiddenimports=hiddenimports,
hookspath=[hook_path],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
if is_darwin:
exe_contents = (pyz, a.scripts, a.binaries, a.zipfiles, a.datas, [],)
exe_kwargs = dict(runtime_tmpdir=None, icon='rnalysis/favicon.icns')
else:
splash = Splash('rnalysis/gui/splash.png',
binaries=a.binaries,
datas=a.datas,
text_pos=(175, 510),
text_font='Calibri',
text_size=16,
text_color='black',
always_on_top=False)
exe_contents = (pyz, splash, a.scripts, [],)
exe_kwargs = dict(exclude_binaries=True, icon='rnalysis/favicon.ico')
exe = EXE(
*exe_contents,
**exe_kwargs,
name='RNAlysis',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
hide_console='hide-late'
)
if not is_darwin:
coll = COLLECT(
exe,
splash.binaries,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='RNAlysis-4.1.0',
)