Skip to content

Commit 5bc0d50

Browse files
authored
Issue #70 Add conditional logic to pyinstaller.spec to remove strip flag from windows (#73)
* Issue #70: Add conditional logic to pyinstaller.spec * Fix indentation
1 parent e5da070 commit 5bc0d50

File tree

1 file changed

+27
-13
lines changed

1 file changed

+27
-13
lines changed

pyinstaller.spec

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# This file tells PyInstaller how to bundle your application
33

44
from PyInstaller.utils.hooks import copy_metadata
5+
import sys
56

67
block_cipher = None
78

@@ -34,16 +35,29 @@ a = Analysis(
3435
)
3536

3637
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
37-
38-
exe = EXE(
39-
pyz,
40-
a.scripts,
41-
a.binaries,
42-
a.zipfiles,
43-
a.datas,
44-
name='mangotango', # The name of the executable
45-
debug=False,
46-
strip=True,
47-
upx=True, # You can set this to False if you don’t want UPX compression
48-
console=True # Set to False if you don't want a console window
49-
)
38+
if sys.platform == "darwin":
39+
exe = EXE(
40+
pyz,
41+
a.scripts,
42+
a.binaries,
43+
a.zipfiles,
44+
a.datas,
45+
name='mangotango', # The name of the executable
46+
debug=False,
47+
strip=True,
48+
upx=True, # You can set this to False if you don’t want UPX compression
49+
console=True # Set to False if you don't want a console window
50+
)
51+
else:
52+
exe = EXE(
53+
pyz,
54+
a.scripts,
55+
a.binaries,
56+
a.zipfiles,
57+
a.datas,
58+
name='mangotango', # The name of the executable
59+
debug=False,
60+
strip=False,
61+
upx=True, # You can set this to False if you don’t want UPX compression
62+
console=True # Set to False if you don't want a console window
63+
)

0 commit comments

Comments
 (0)