Files
openworker/packaging/cli_entry.py
Rohit C Prasad 258fe8c76a Linux: build openworker as one program, no Python needed
packaging/build_linux.sh builds it in a bullseye container (glibc 2.31) and packs a tar.gz.
Bundles now carry the package metadata, so the version is real instead of 0.0.0.
2026-09-29 11:08:22 -07:00

23 lines
703 B
Python

"""PyInstaller entry point for the Linux `openworker` program (build_linux.sh).
One program for the whole command line. Called as `openworker-server` (the bundle ships
that name as a link to the same file) it runs the server instead, as the pip install does.
"""
import os
import sys
if __name__ == "__main__":
# Runner mode first, before anything else is imported (coworker/sandbox/launch.py).
from coworker.sandbox.launch import maybe_run_runner
maybe_run_runner(sys.argv[1:])
if os.path.basename(sys.argv[0]) == "openworker-server":
from coworker.server.run import main as server_main
server_main()
else:
from coworker.cli import main
main()