Skip to content

Commit

Permalink
add: pyinstaller spec file for Mac OS X
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanTaquet committed Oct 20, 2016
1 parent 6a6cbfa commit e22d6eb
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions osx-x64-Oe2sSLE_GUI.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# -*- mode: python -*-

from importlib.machinery import SourceFileLoader

version = SourceFileLoader("module.name", os.path.abspath(".")+os.sep+"version.py").load_module()
Oe2sSLE_VERSION = version.Oe2sSLE_VERSION

def resource_path(relative_path):
""" Get absolute path to resource, works for dev and for PyInstaller """
try:
# PyInstaller creates a temp folder and stores path in _MEIPASS
base_path = sys._MEIPASS
except Exception:
base_path = os.path.abspath(".")

return os.path.join(base_path, relative_path)


block_cipher = None


added_files = [
( 'images','images'),
]

a = Analysis(['Oe2sSLE_GUI.py'],
pathex=['.'],
binaries=None,
datas=added_files,
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
cipher=block_cipher)

pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name='Oe2sSLE-'+str(Oe2sSLE_VERSION[0])+'.'+str(Oe2sSLE_VERSION[1])+'.'+str(Oe2sSLE_VERSION[2])+'-osx-x64',
debug=False,
strip=False,
upx=True,
console=False )

app = BUNDLE(exe,
name='Oe2sSLE-'+str(Oe2sSLE_VERSION[0])+'.'+str(Oe2sSLE_VERSION[1])+'.'+str(Oe2sSLE_VERSION[2])+'.app',
icon=None,
bundle_identifier=None)

0 comments on commit e22d6eb

Please sign in to comment.