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>
This commit is contained in:
2026-05-02 14:07:48 +02:00
parent 35ca0a8b45
commit 077e1a97c1

View File

@@ -5,8 +5,14 @@ a = Analysis(
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/lua_func', 'lua_func'),
('../../src/testium/py_func', 'py_func'),
('../../src/testium/runtime', 'runtime')],
hiddenimports=["git",
"interpreter",
"main_win",