-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalmufarrigh.spec
106 lines (100 loc) · 2.46 KB
/
almufarrigh.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
99
100
101
102
103
104
105
106
from contextlib import suppress
from importlib.metadata import PackageNotFoundError
from os import name as os_name
from shutil import which
from PyInstaller.building.api import COLLECT, EXE, PYZ
from PyInstaller.building.build_main import Analysis
from PyInstaller.building.osx import BUNDLE
from PyInstaller.utils.hooks import collect_data_files, copy_metadata
datas = [
("src/qml", "qml/"),
("src/resources", "resources/"),
("src/resources_rc.py", "."),
]
datas += collect_data_files("whisper")
datas += collect_data_files("transformers", include_py_files=True)
datas += collect_data_files("torch")
with suppress(PackageNotFoundError):
datas += copy_metadata("torch")
datas += copy_metadata("tqdm")
with suppress(PackageNotFoundError):
datas += copy_metadata("numpy")
datas += copy_metadata("requests")
datas += copy_metadata("pydub")
datas += copy_metadata("auditok")
datas += copy_metadata("tafrigh")
binaries = []
if os_name == "nt":
binaries += [("ffmpeg.exe", "."), ("ffprobe.exe", ".")]
else:
if ffmpeg_path := which("ffmpeg"):
datas += [(ffmpeg_path, ".")]
a = Analysis(
["src/main.py"],
pathex=[],
binaries=binaries,
datas=datas,
hiddenimports=[],
hookspath=[],
hooksconfig={},
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=None,
runtime_hooks=[],
excludes=[
"regex",
"tkinter",
"lib2to3",
"unittest",
"test",
"websockets",
"xmlrpc",
"chardet",
"pyreadline",
"pycparser",
"pydoc_data",
],
noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=None)
exe = EXE(
pyz,
a.scripts,
[],
name="AlMufarrigh",
icon="./src/resources/images/logo.ico",
exclude_binaries=True,
debug=True,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
coll = COLLECT(
exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=False,
upx_exclude=[],
name="almufarrigh",
)
app = BUNDLE(
coll,
name="AlMufarrigh.app",
icon="./src/resources/images/logo.icns",
bundle_identifier="com.almufarrigh",
version="0.1.0",
info_plist={
"NSPrincipalClass": "NSApplication",
"NSHighResolutionCapable": "True",
},
)