mirror of
https://github.com/clearml/wexpect-venv
synced 2025-01-30 18:36:57 +00:00
[ADD] pyinstaller feature based on #12
This commit is contained in:
parent
62986d022c
commit
e7f58cc2fc
37
wexpect.spec
Normal file
37
wexpect.spec
Normal file
@ -0,0 +1,37 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
|
||||
block_cipher = None
|
||||
|
||||
|
||||
a = Analysis(['wexpect\\__main__.py'],
|
||||
pathex=[],
|
||||
binaries=[],
|
||||
datas=[],
|
||||
hiddenimports=[],
|
||||
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,
|
||||
[],
|
||||
exclude_binaries=True,
|
||||
name='wexpect',
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
console=True )
|
||||
coll = COLLECT(exe,
|
||||
a.binaries,
|
||||
a.zipfiles,
|
||||
a.datas,
|
||||
strip=False,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
name='wexpect')
|
@ -390,14 +390,13 @@ class SpawnBase:
|
||||
https://github.com/pyinstaller/pyinstaller/issues/822
|
||||
'''
|
||||
|
||||
if getattr(sys, '_MEIPASS', False):
|
||||
if not hasattr(sys, '_MEIPASS'):
|
||||
raise Exception(
|
||||
'`sys.frozen` found, but `sys._MEIPASS` not. Only pyinstaller is'
|
||||
' supported.'
|
||||
'`sys.frozen` found, but `sys._MEIPASS` not. Only pyinstaller is supported.'
|
||||
)
|
||||
dirname = os.path.dirname(sys.executable)
|
||||
|
||||
console_executable = os.path.join(dirname, '__main__.exe')
|
||||
console_executable = os.path.join(dirname, '..', 'wexpect', 'wexpect.exe')
|
||||
commandLine = f'"{console_executable}" {console_args}'
|
||||
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user