Skip to content

Commit

Permalink
fix: execstack
Browse files Browse the repository at this point in the history
  • Loading branch information
chidiwilliams committed Jan 3, 2024
1 parent b6409fb commit cd78d8a
Showing 1 changed file with 37 additions and 30 deletions.
67 changes: 37 additions & 30 deletions Buzz.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,39 @@ import shutil

from PyInstaller.utils.hooks import collect_data_files, copy_metadata

from buzz.__version__ import VERSION

datas = []
datas += collect_data_files('torch')
datas += copy_metadata('tqdm')
datas += copy_metadata('torch')
datas += copy_metadata('regex')
datas += copy_metadata('requests')
datas += copy_metadata('packaging')
datas += copy_metadata('filelock')
datas += copy_metadata('numpy')
datas += copy_metadata('tokenizers')

# Allow transformers package to load __init__.py file dynamically:
# https://github.com/chidiwilliams/buzz/issues/272
datas += collect_data_files('transformers', include_py_files=True)
if platform.system() != "Linux":
datas += collect_data_files("torch")

datas += copy_metadata("tqdm")

if platform.system() != "Linux":
datas += copy_metadata("torch")

datas += copy_metadata("regex")
datas += copy_metadata("requests")
datas += copy_metadata("packaging")
datas += copy_metadata("filelock")
datas += copy_metadata("numpy")
datas += copy_metadata("tokenizers")

if platform.system() != "Linux":
# Allow transformers package to load __init__.py file dynamically:
# https://github.com/chidiwilliams/buzz/issues/272
datas += collect_data_files("transformers", include_py_files=True)
datas += collect_data_files("whisper")

datas += collect_data_files('whisper')
datas += [(file[1], os.path.dirname(file[1])) for file in
Tree('./locale', prefix='locale', excludes=['*.po'])]
datas += [(shutil.which('ffmpeg'), '.')]
datas += [
(file[1], os.path.dirname(file[1]))
for file in Tree("./locale", prefix="locale", excludes=["*.po"])
]
datas += [(shutil.which("ffmpeg"), ".")]

block_cipher = None

a = Analysis(
['main.py'],
["main.py"],
pathex=[],
binaries=[],
datas=datas,
Expand All @@ -50,9 +57,9 @@ exe = EXE(
pyz,
a.scripts,
[],
icon='./assets/buzz.ico',
icon="./assets/buzz.ico",
exclude_binaries=True,
name='Buzz',
name="Buzz",
debug=True,
bootloader_ignore_signals=False,
strip=False,
Expand All @@ -72,17 +79,17 @@ coll = COLLECT(
strip=False,
upx=False,
upx_exclude=[],
name='Buzz',
name="Buzz",
)
app = BUNDLE(
coll,
name='Buzz.app',
icon='./assets/buzz.icns',
bundle_identifier='com.chidiwilliams.buzz',
version='0.8.4',
name="Buzz.app",
icon="./assets/buzz.icns",
bundle_identifier="com.chidiwilliams.buzz",
version="0.8.4",
info_plist={
'NSPrincipalClass': 'NSApplication',
'NSHighResolutionCapable': 'True',
'NSMicrophoneUsageDescription': 'Allow Buzz to record audio from your microphone.'
}
"NSPrincipalClass": "NSApplication",
"NSHighResolutionCapable": "True",
"NSMicrophoneUsageDescription": "Allow Buzz to record audio from your microphone.",
},
)

0 comments on commit cd78d8a

Please sign in to comment.