Skip to content

Install via uv (isolated Python 3.11 venv) -- fix stock-macOS installs#29

Merged
0xadvait merged 1 commit into
mainfrom
uv-packaging
Jun 24, 2026
Merged

Install via uv (isolated Python 3.11 venv) -- fix stock-macOS installs#29
0xadvait merged 1 commit into
mainfrom
uv-packaging

Conversation

@0xadvait

Copy link
Copy Markdown
Collaborator

External installs were failing on a clean Mac:

ERROR: Could not find a version that satisfies the requirement opengradient-veil<0.3,>=0.2.7 (from versions: none)

Root cause: opengradient-veil and the SDK require Python >= 3.11, but the installer used whatever python3 was on PATH -- Apple's system Python is 3.9, so pip found no compatible distribution. (It only worked on machines that happened to have 3.11 as python3.)

Fix = standard packaging + uv:

  • pyproject.toml (PEP 621, package = false) + uv.lock are the source of truth; requirements.txt removed.
  • install.sh auto-installs uv and runs uv sync into an isolated venv at ~/.ghost/venv, with uv provisioning its own CPython 3.11 (downloaded if missing). System Python is never touched.
  • launchd services + the ghost commands point at that venv.
  • The NER scrubber (presidio + spaCy) is now an opt-in extra, installed only with GHOST_SCRUB (redaction is off by default), so the default install is lean. Fixes the misleading "NER PII scrubber enabled" line.

Verified end to end on this machine: uv sync resolves the full tree (og-veil 0.2.7, SDK 1.1.1, web3, ...), services + launcher run on the venv's 3.11, smoke test passes.

External installs failed on stock macOS: opengradient-veil + the SDK require
Python >=3.11, but the installer grabbed whatever python3 was on PATH (Apple
ships 3.9), so pip reported 'no matching distribution'.

Switch to standard packaging: pyproject.toml + uv.lock declare the deps and
requires-python, and the installer uses uv (auto-installed) to provision an
isolated venv at ~/.ghost/venv with its own CPython 3.11 (downloaded if the
machine lacks one). Nothing touches the system python.

- add pyproject.toml (PEP 621, package=false) + uv.lock; remove requirements.txt
- install.sh: ensure uv; 'uv sync' (--frozen, falls back to re-resolve) into the
  venv; point the launchd services + ghost commands at it
- NER scrubber (presidio extra + spaCy model) installs only with GHOST_SCRUB, so
  the default install is lean; fix the misleading 'NER PII scrubber enabled' line
- README: note uv handles Python, only git is a prerequisite
@0xadvait 0xadvait merged commit db9f06f into main Jun 24, 2026
@0xadvait 0xadvait deleted the uv-packaging branch June 24, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant