Files
testium/package/pyinstaller/testium.spec
François 077e1a97c1 Update PyInstaller spec for the new package layout
- Drop the now-obsolete src/lib and src/py_func data entries (those
  paths no longer exist)
- Add src/testium/py_func and src/testium/runtime as bundle-root data
  dirs: the py_func subprocess is launched with the *host* Python
  (not the frozen interpreter), so it needs the source files on disk
  at cwd=subproc_path() to find py_func/__main__.py and import from
  runtime.*
- Hidden imports updated: libs.* → api.*, plus py_func.* explicitly
  declared so PyInstaller pulls them into the bundle even though
  they are loaded as data

Smoke-tested: built binary runs `testium -b`, py_func subprocess works.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-02 14:07:48 +02:00

70 lines
2.0 KiB
Python

# -*- mode: python ; coding: utf-8 -*-
a = Analysis(
['../../src/testium/__main__.py'],
pathex=['../../src/testium',
'../../src/testium/main_win/resources'],
binaries=[],
# py_func/ and runtime/ are bundled at the _MEIPASS root because the
# py_func subprocess is launched with the *host* Python (not the
# frozen interpreter): it needs the source files on disk to find them
# via cwd=subproc_path() and `python3 py_func` + `from runtime.*`.
datas=[('../../src/VERSION', '.'),
('../../src/testium/lua_func', 'lua_func'),
('../../src/testium/py_func', 'py_func'),
('../../src/testium/runtime', 'runtime')],
hiddenimports=["git",
"interpreter",
"main_win",
"runtime",
"py_func",
"py_func.tm",
"py_func.handle",
"py_func.func_call",
"api",
"api.console",
"api.termconsole",
"api.console_ssh",
"api.raw_tcp_console",
"api.runtime_plot",
"api.testium",
"matplotlib.backends.backend_pdf",
"telnetlib3",
"serial",
"yaml",
"pexpect",
"jinja2",
"colorama",
"matplotlib",
"junit_xml",
"lxml"],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='testium',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
ico='../testium.png'
)