Skip to content

Commit

Permalink
gui: run black on gui.spec (#1477)
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzeid authored Sep 28, 2023
1 parent df67be4 commit 3886011
Showing 1 changed file with 45 additions and 46 deletions.
91 changes: 45 additions & 46 deletions gui/gui.spec
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# -*- mode: python -*-
import sys
from PyInstaller.utils.hooks import (collect_all, collect_submodules)
from PyInstaller.utils.hooks import collect_all, collect_submodules
from mozregression.pyinstaller import BUNDLE_WITH_TK

IS_MAC = sys.platform == "darwin"

block_cipher = None

datas, binaries, hiddenimports = [], [], []
for pkgname in ['glean', 'glean_parser', 'mozregression', 'yamllint', 'bs4']:
for pkgname in ["glean", "glean_parser", "mozregression", "yamllint", "bs4"]:
pkg_datas, pkg_binaries, pkg_hiddenimports = collect_all(pkgname)
datas.extend(pkg_datas)
binaries.extend(pkg_binaries)
hiddenimports.extend(pkg_hiddenimports)

# workaround this bad interaction between setuptools and pyinstaller:
# https://github.com/pypa/setuptools/issues/1963
hiddenimports.extend(collect_submodules('pkg_resources'))
hiddenimports.extend(collect_submodules("pkg_resources"))

analysis_kwargs = {
"binaries": binaries,
Expand All @@ -27,54 +27,53 @@ analysis_kwargs = {
"win_no_prefer_redirects": False,
"win_private_assemblies": False,
"cipher": block_cipher,
"noarchive": False
"noarchive": False,
}
if IS_MAC:
analysis_kwargs["runtime_hooks"] = ["splash_hook.py"]

a = Analysis(['mozregression-gui.py'], **analysis_kwargs)
a = Analysis(["mozregression-gui.py"], **analysis_kwargs)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)

if IS_MAC:
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='mozregression GUI',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=False,
console=False,
target_arch="universal2")
app = BUNDLE_WITH_TK(exe,
strip=False,
upx=True,
name='mozregression GUI.app',
icon='icons/app_icon.icns',
bundle_identifier=None,
info_plist={
'NSPrincipalClass': 'NSApplication',
'NSHighResolutionCapable': 'True'
})
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name="mozregression GUI",
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=False,
console=False,
target_arch="universal2",
)
app = BUNDLE_WITH_TK(
exe,
strip=False,
upx=True,
name="mozregression GUI.app",
icon="icons/app_icon.icns",
bundle_identifier=None,
info_plist={"NSPrincipalClass": "NSApplication", "NSHighResolutionCapable": "True"},
)
else:
exe = EXE(pyz,
a.scripts,
[],
name='mozregression-gui',
exclude_binaries=True,
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=False,
console=False,
icon='wininst/app_icon.ico')
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=False,
name='mozregression-gui')
exe = EXE(
pyz,
a.scripts,
[],
name="mozregression-gui",
exclude_binaries=True,
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=False,
console=False,
icon="wininst/app_icon.ico",
)
coll = COLLECT(
exe, a.binaries, a.zipfiles, a.datas, strip=False, upx=False, name="mozregression-gui"
)

0 comments on commit 3886011

Please sign in to comment.