Skip to content

Commit

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

from PyInstaller.utils.hooks import collect_data_files, copy_metadata

datas = []

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

datas += copy_metadata("tqdm")
from buzz.__version__ import VERSION

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")
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')

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")
# 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 += [
(file[1], os.path.dirname(file[1]))
for file in Tree("./locale", prefix="locale", excludes=["*.po"])
]
datas += [(shutil.which("ffmpeg"), ".")]
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'), '.')]

block_cipher = None

a = Analysis(
["main.py"],
['main.py'],
pathex=[],
binaries=[],
datas=datas,
Expand All @@ -57,9 +50,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 @@ -79,17 +72,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.'
}
)
Loading

0 comments on commit 20c5e83

Please sign in to comment.