Skip to content

Instantly share code, notes, and snippets.

@BroHui
Created January 12, 2021 09:14
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 BroHui/228998908886359d1e6da7fc1b133a8a to your computer and use it in GitHub Desktop.
Save BroHui/228998908886359d1e6da7fc1b133a8a to your computer and use it in GitHub Desktop.
Django2.2 PyInstaller For Win10
# -*- mode: python -*-
block_cipher = None
a = Analysis(['myproject\\manage.py'],
pathex=['D:\\GitHub\\django_samples\\django_pyinstaller_sample'],
binaries=[],
datas=[
('myproject/templates', 'templates'),
('myproject/static_files', 'static_files'),
('myproject/myapp/fixtures', 'myapp/fixtures'),
],
hiddenimports=[
'myapp.apps',
'myapp.urls',
],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='myproject',
debug=False,
bootloader_ignore_signals=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