Python Worker Packaging Prep
Reproducible local launch
- Entry point:
python python/worker/main.py- Quick protocol smoke checks:
echo {"type":"ping","jobId":"smoke"} | python python/worker/main.pyecho {"type":"version","jobId":"smoke"} | python python/worker/main.pyecho {"type":"health","jobId":"smoke"} | python python/worker/main.py
Pathing and import safety updates
- Worker implementation moved to
python/worker/worker_impl.py. - Stable entrypoint remains
python/worker/main.py. - Legacy shim kept at
py/cgal_worker.pyfor backward compatibility. - New runtime helpers in
python/worker/runtime.py: - repo root discovery without depending on current working directory
- module path bootstrapping for
python/worker+py/geodesic - dependency probe utilities
Dependency + asset inventory
- Generated inventory:
docs/python-worker-asset-inventory.json- Inventory command:
python python/worker/inventory.py > docs/python-worker-asset-inventory.json
Current environment result
numpy: OKscipy: OKsympy: OKvtk: OKpygalmesh: MISSING (No module named 'pygalmesh')
pygalmesh install attempt (Windows dev box)
python -m pip install pygalmeshfailed.- Build error: missing Eigen headers (
fatal error C1083: Cannot open include file: 'Eigen/Dense'). - This confirms CGAL/Eigen toolchain prerequisites must be documented/provisioned for freeze builds.
Non-code assets that must ship with worker
python/worker/main.pypython/worker/worker_impl.pypython/worker/runtime.pypy/geodesic/**- Native extension/runtime files from Python env for:
numpyscipyvtkpygalmesh(once installed on build machine)
Packaging note
vtk and scipy include a large set of native binaries; pygalmesh also needs native CGAL/Eigen-linked artifacts. Freeze config (PyInstaller/cx_Freeze) will need hidden imports and binary collection rules based on the inventory output.