I would like to include shapefiles in the .exe
itself.
When I run the following spec file
, my .exe
is created but I must include in the same folder my shapefiles in order to run my application.
I was wondering if I can package my application with the list of shapefiles in order that my application is autonomous and does not require other files on the side.
The spec file:
# -*- mode: python -*-
block_cipher = None
a = Analysis(['map.py'],
pathex=['C:\\Users\\...\\PyQt5\\Qt\\bin', 'C:\\Users\\...\\Applications'],
binaries=[],
datas=[('C:\\Users\\...\\Applications\\data', 'dir')],
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='XXX',
debug=False,
strip=False,
upx=True,
runtime_tmpdir=None,
console=False )
FYI: I saved all my shapefiles at the following address: C:\Users\...\Applications\data
Thank you