. , pypandoc pandoc.exe. pyinstaller, .
.spec. , , :
block_cipher = None
a = Analysis(['pythonfile.py'],
pathex=['CodeDIR'],
binaries=[],
datas=[],
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='EXEName',
debug=False,
strip=False,
upx=True,
console=True ,
resources=['YourPandocLocationHere\\\\pandoc.exe'])
, pyinstaller myspec.spec. name.
, . one-file - , pyinstaller . pandoc.exe , .exe. , , pypandoc , .
if hasattr(sys, '_MEIPASS'):
os.chdir(sys._MEIPASS)