The CLI shipped from `management/`, which also holds desktop-only pieces (the Tk control panel, the XFCE panel wiring, the shell wrappers). Packaging that directory meant the wheel either dragged in tkinter or shipped a broken import. Split it: `nexusos_cli/` is what the wheel ships and what `nexus`/`ncp`/ `nexusos` dispatch to, `management/` keeps the desktop half. Alongside the move: * hatch_build.py decides the interface/web/dist include at build time. dist/ is gitignored, so a static force-include aborts `pip install -e .` on a fresh clone - before the reader reaches the `npm run build` step. Editable installs now skip a missing dist; wheels and sdists hard-error naming the command to run. * synapse/proc_util.py gives frontend_manager and ncp process inspection and termination without psutil, which became an optional extra when the wheel landed. It routes around Windows having no signals, where os.kill(pid, 15) is an unblockable TerminateProcess rather than a polite request. * nexusos_cli/monitor.py adds `ncp monitor`, an ASCII dashboard with no curses or rich dependency so it works in Termux, plain SSH and Windows Terminal. Collector and renderer are separate so tests feed fixtures, no stack needed. * tests/test_packaging_deps.py fails the gate when synapse or nexusos_cli import a distribution pyproject does not declare, and when an optional dependency is imported at module scope instead of lazily. * bin/check.sh now builds the wheel, twine-checks it, and asserts the compiled UI and seed playbooks are actually inside it. A wheel that builds but ships no dist/ serves a blank page, which only shows up after release. tests/test_nexus_api.py moves to tests/ with the module it covers. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
128 lines
3.6 KiB
TOML
128 lines
3.6 KiB
TOML
[build-system]
|
|
requires = ["hatchling>=1.26"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[project]
|
|
name = "nexusos-ai"
|
|
dynamic = ["version"]
|
|
description = "Local-first AI assistant runtime, web UI, and portable CLI"
|
|
readme = "README.md"
|
|
requires-python = ">=3.11"
|
|
authors = [{name = "EnderOfWings"}]
|
|
keywords = ["ai", "assistant", "ollama", "local-ai", "termux"]
|
|
classifiers = [
|
|
"Development Status :: 4 - Beta",
|
|
"Environment :: Console",
|
|
"Framework :: FastAPI",
|
|
"Operating System :: Android",
|
|
"Operating System :: Microsoft :: Windows",
|
|
"Operating System :: POSIX :: Linux",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Programming Language :: Python :: 3.13",
|
|
"Programming Language :: Python :: 3.14",
|
|
"Topic :: Communications :: Chat",
|
|
]
|
|
dependencies = [
|
|
"fastapi>=0.115,<1",
|
|
"httpx>=0.27,<1",
|
|
"pydantic>=2.7,<3",
|
|
"python-dotenv>=1,<2",
|
|
"PyYAML>=6,<7",
|
|
"uvicorn>=0.30,<1",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
documents = ["pypdf>=5,<7", "python-docx>=1.1,<2"]
|
|
process = ["psutil>=5.9,<8"]
|
|
vector = ["sqlite-vec>=0.1,<1"]
|
|
voice = ["faster-whisper>=1.1,<2"]
|
|
mail = ["imap-tools>=1.7,<2"]
|
|
# synapse/search.py imports this lazily behind a bare except, so without it
|
|
# declared the chat web-search path silently returns nothing.
|
|
search = ["duckduckgo-search>=6,<9"]
|
|
desktop = [
|
|
"psutil>=5.9,<8",
|
|
"pywebview>=5,<7; platform_system == 'Windows'",
|
|
]
|
|
standard = [
|
|
"pypdf>=5,<7",
|
|
"python-docx>=1.1,<2",
|
|
"psutil>=5.9,<8",
|
|
"sqlite-vec>=0.1,<1",
|
|
"duckduckgo-search>=6,<9",
|
|
]
|
|
# Every optional capability at once. Kept in sync with the extras above by
|
|
# tests/test_packaging_deps.py, which also checks that nothing synapse imports
|
|
# is missing from this file.
|
|
all = [
|
|
"pypdf>=5,<7",
|
|
"python-docx>=1.1,<2",
|
|
"psutil>=5.9,<8",
|
|
"sqlite-vec>=0.1,<1",
|
|
"faster-whisper>=1.1,<2",
|
|
"imap-tools>=1.7,<2",
|
|
"duckduckgo-search>=6,<9",
|
|
"pywebview>=5,<7; platform_system == 'Windows'",
|
|
]
|
|
dev = [
|
|
"build>=1.2,<2",
|
|
"pytest>=8,<10",
|
|
"twine>=7,<8",
|
|
]
|
|
|
|
[project.scripts]
|
|
nexus = "nexusos_cli.cli:entrypoint"
|
|
ncp = "nexusos_cli.cli:entrypoint"
|
|
nexusos = "nexusos_cli.cli:entrypoint"
|
|
|
|
[project.urls]
|
|
Homepage = "https://git.enderofwings.com/enderofwings/NexusOS"
|
|
Issues = "https://git.enderofwings.com/enderofwings/NexusOS/issues"
|
|
Repository = "https://git.enderofwings.com/enderofwings/NexusOS"
|
|
|
|
[tool.hatch.version]
|
|
path = "VERSION"
|
|
pattern = "^(?P<version>[^\\s]+)$"
|
|
|
|
[tool.hatch.build]
|
|
skip-excluded-dirs = true
|
|
|
|
# Ships interface/web/dist when it has been built. It is gitignored, so a
|
|
# static force-include would abort `pip install -e .` on a fresh clone.
|
|
[tool.hatch.build.hooks.custom]
|
|
path = "hatch_build.py"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["synapse", "nexusos_cli"]
|
|
|
|
[tool.hatch.build.targets.wheel.force-include]
|
|
"VERSION" = "synapse/_resources/VERSION"
|
|
"data/playbooks" = "synapse/_resources/playbooks"
|
|
"assets/n-small.png" = "synapse/_resources/assets/n-small.png"
|
|
"assets/themes/NexusOS-icons-src/nexus-underlay.svg" = "synapse/_resources/assets/themes/NexusOS-icons-src/nexus-underlay.svg"
|
|
"assets/themes/NexusOS-icons-src/nexus-underlay-ring.svg" = "synapse/_resources/assets/themes/NexusOS-icons-src/nexus-underlay-ring.svg"
|
|
|
|
[tool.hatch.build.targets.sdist]
|
|
include = [
|
|
"/assets/n-small.png",
|
|
"/assets/themes/NexusOS-icons-src/nexus-underlay.svg",
|
|
"/assets/themes/NexusOS-icons-src/nexus-underlay-ring.svg",
|
|
"/data/playbooks",
|
|
"/docs",
|
|
"/management",
|
|
"/nexusos_cli",
|
|
"/scripts",
|
|
"/synapse",
|
|
"/tests",
|
|
"/README.md",
|
|
"/VERSION",
|
|
"/pyproject.toml",
|
|
"/hatch_build.py",
|
|
]
|
|
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests", "management"]
|