1a4b390e8a
Addresses the review on PR #481. Self-contained wheel (review point 1): the gateway/infra/orchestrator images build from a context that must hold bot_bottle/, pyproject.toml, and the root-level Dockerfiles. Modules previously located these by walking __file__ to the repo root, so an installed wheel (package in site-packages, no repo root) passed `doctor` but failed `start`. - Add bot_bottle/resources.py: build_root() returns the repo root in a checkout (unchanged) or a staged copy from the wheel's bundled _resources/ otherwise; dockerfile()/nix_netpool_module()/ netpool_script() derive from it. - setup.py bundles the root Dockerfiles, nix module, netpool script, and pyproject.toml into bot_bottle/_resources/ at build; MANIFEST.in ships them in the sdist. - Route every _REPO_ROOT/_REPO_DIR call site (docker/macos launch, macos infra, firecracker infra_vm/infra_artifact/setup, orchestrator lifecycle/gateway) through resources. Checkout behavior is unchanged. install.sh prerequisites (review point 2): check for git when installing a git+ spec, and — before the pip fallback — that pip is usable and the interpreter isn't externally managed (PEP 668), pointing at pipx. Tests: test_resources covers checkout + staged-wheel layouts; test_wheel_install builds the wheel, installs it into an isolated venv, and asserts `doctor` runs and build_root() yields a valid context. Running `start` end-to-end still needs a Docker/KVM host (CI). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
46 lines
1.5 KiB
TOML
46 lines
1.5 KiB
TOML
[build-system]
|
|
requires = ["setuptools>=68"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "bot-bottle"
|
|
version = "0.1.0"
|
|
description = "Self-hosted sandbox for running AI coding agents with egress controls"
|
|
readme = "README.md"
|
|
requires-python = ">=3.11"
|
|
license = { text = "Apache-2.0" }
|
|
authors = [{ name = "didericis" }]
|
|
keywords = ["ai", "agents", "sandbox", "security", "egress"]
|
|
classifiers = [
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3 :: Only",
|
|
"Operating System :: POSIX :: Linux",
|
|
"Operating System :: MacOS",
|
|
]
|
|
# The package itself has no runtime pip dependencies (stdlib-only); the
|
|
# only language runtime is the Python interpreter. Keep this empty.
|
|
dependencies = []
|
|
|
|
[project.urls]
|
|
Homepage = "https://gitea.dideric.is/didericis/bot-bottle"
|
|
Source = "https://gitea.dideric.is/didericis/bot-bottle"
|
|
|
|
[project.scripts]
|
|
bot-bottle = "bot_bottle.cli:main"
|
|
|
|
[tool.setuptools.packages.find]
|
|
include = ["bot_bottle*"]
|
|
|
|
# Non-Python assets the runtime reads from inside the package (container
|
|
# build contexts, entrypoints, netpool defaults). Keep in sync with the
|
|
# files shipped under bot_bottle/; test_pyproject.py asserts they exist.
|
|
[tool.setuptools.package-data]
|
|
bot_bottle = [
|
|
"gateway/egress/entrypoint.sh",
|
|
"contrib/claude/Dockerfile",
|
|
"contrib/codex/Dockerfile",
|
|
"contrib/pi/Dockerfile",
|
|
"backend/firecracker/netpool.defaults.env",
|
|
"backend/macos_container/nested-containers-init.sh",
|
|
]
|