Skip to content

Commit

Permalink
Issue civictechdc#70: Add conditional logic to pyinstaller.spec
Browse files Browse the repository at this point in the history
  • Loading branch information
DeanEby committed Feb 8, 2025
1 parent e5da070 commit ab1f432
Showing 1 changed file with 27 additions and 13 deletions.
40 changes: 27 additions & 13 deletions pyinstaller.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# This file tells PyInstaller how to bundle your application

from PyInstaller.utils.hooks import copy_metadata
import sys

block_cipher = None

Expand Down Expand Up @@ -34,16 +35,29 @@ a = Analysis(
)

pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)

exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name='mangotango', # The name of the executable
debug=False,
strip=True,
upx=True, # You can set this to False if you don’t want UPX compression
console=True # Set to False if you don't want a console window
)
if sys.platform == "darwin":
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name='mangotango', # The name of the executable
debug=False,
strip=True,
upx=True, # You can set this to False if you don’t want UPX compression
console=True # Set to False if you don't want a console window
)
else:
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name='mangotango', # The name of the executable
debug=False,
strip=False,
upx=True, # You can set this to False if you don’t want UPX compression
console=True # Set to False if you don't want a console window
)

0 comments on commit ab1f432

Please sign in to comment.