Skip to content

Instantly share code, notes, and snippets.

@samj1912
Last active January 8, 2019 23:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samj1912/0b8d71ab7fa1b2d9e9dc3b8ccf4c3df9 to your computer and use it in GitHub Desktop.
Save samj1912/0b8d71ab7fa1b2d9e9dc3b8ccf4c3df9 to your computer and use it in GitHub Desktop.
# -*- mode: python -*-
import os
import platform
block_cipher = None
def get_resources():
data_files = []
for file_name in os.listdir('resources'):
data_files.append((os.path.join('resources', file_name), 'resources'))
return data_files
a = Analysis(['entry_point.py'],
pathex=['/path/to/package_dir'],
binaries=[],
datas=get_resources(),
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
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='foobar',
debug=False,
strip=False,
upx=True,
runtime_tmpdir=None,
console=True )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment