From 6ddc9b0303a91ee83adb6dd4ad175a2b31488f3c Mon Sep 17 00:00:00 2001 From: HenryNdubuaku Date: Thu, 5 Nov 2026 10:40:27 -0800 Subject: [PATCH] Publish the inference engine as cactus-engine Signed-off-by: HenryNdubuaku --- .github/workflows/pypi.yml | 8 +++++--- .github/workflows/release.yml | 5 +++-- cactus-code/scripts/bundle-for-pypi.sh | 2 +- python/README.md | 10 ++++++++-- python/cactus/bindings/cactus.py | 2 +- python/cactus/cli/__init__.py | 2 +- python/cactus/cli/common.py | 2 +- python/pyproject.toml | 6 +++--- 8 files changed, 23 insertions(+), 14 deletions(-) diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 9cf97fcd3..04c71beec 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -2,6 +2,9 @@ name: PyPI Publish on: workflow_call: + secrets: + PYPI_TOKEN: + required: true workflow_dispatch: inputs: version: @@ -28,7 +31,7 @@ jobs: - uses: ./.github/actions/stamp-version - name: Install SDL2 (live microphone transcription) - run: brew install sdl2 + run: brew install sdl2 sdl3 - name: Build native library run: | @@ -147,8 +150,6 @@ jobs: needs: [wheels-macos, wheels-linux, sdist] runs-on: ubuntu-24.04 timeout-minutes: 15 - permissions: - id-token: write steps: - uses: actions/download-artifact@v4 with: @@ -158,4 +159,5 @@ jobs: - uses: pypa/gh-action-pypi-publish@release/v1 with: packages-dir: dist + password: ${{ secrets.PYPI_TOKEN }} attestations: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c79543413..e77cbfaec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,16 +14,17 @@ concurrency: jobs: pypi: permissions: - id-token: write contents: read uses: ./.github/workflows/pypi.yml + secrets: + PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} homebrew: needs: pypi runs-on: ubuntu-24.04 timeout-minutes: 15 env: - PACKAGE: cactus-compute + PACKAGE: cactus-engine TAP: cactus-compute/homebrew-cactus TAG: ${{ github.event.release.tag_name }} steps: diff --git a/cactus-code/scripts/bundle-for-pypi.sh b/cactus-code/scripts/bundle-for-pypi.sh index 4455b2986..756d2c400 100644 --- a/cactus-code/scripts/bundle-for-pypi.sh +++ b/cactus-code/scripts/bundle-for-pypi.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Bundle the built Cactus coding agent into the Python package so it ships in the -# pypi wheel and `cactus code` works after `pip install cactus-compute`. +# pypi wheel and `cactus code` works after `pip install cactus-engine`. # # Produces a self-contained payload at python/cactus/code/ with the four built # packages plus a production-only node_modules (workspace packages copied in via diff --git a/python/README.md b/python/README.md index ae4698163..f853ebcc0 100644 --- a/python/README.md +++ b/python/README.md @@ -6,7 +6,13 @@ keywords: ["Python package", "Python bindings", "on-device AI", "Python FFI", "e # Cactus Python Package -Python bindings for Cactus Engine via FFI. Auto-installed when you run `source ./setup`. +Python bindings for Cactus Engine via FFI. Install with `pip install cactus-engine`. + +This package was previously published as `cactus-compute` through version 2.2.2. +The Python import remains `cactus` and the command remains `cactus`. +`cactus-compute` 3.3.0 and later provides the Needle and Whistle model package. +To migrate an existing engine environment, run `pip uninstall cactus-compute` +followed by `pip install cactus-engine`. > **Model bundles:** Pre-built runtime bundles for all supported models at [huggingface.co/Cactus-Compute](https://huggingface.co/Cactus-Compute). @@ -14,7 +20,7 @@ Python bindings for Cactus Engine via FFI. Auto-installed when you run `source . ```bash -git clone https://github.com/cactus-compute/cactus && cd cactus && source ./setup +git clone https://github.com/cactus-compute/engine && cd engine && source ./setup cactus build --python ``` diff --git a/python/cactus/bindings/cactus.py b/python/cactus/bindings/cactus.py index 4b519d27e..12bfbacc0 100644 --- a/python/cactus/bindings/cactus.py +++ b/python/cactus/bindings/cactus.py @@ -30,7 +30,7 @@ def _find_library(): raise RuntimeError( f"Cactus library ({_LIB_NAME}) not found.\n" - f"Install with: pip install cactus-compute\n" + f"Install with: pip install cactus-engine\n" f"Or build from source: cactus build --python" ) diff --git a/python/cactus/cli/__init__.py b/python/cactus/cli/__init__.py index e841b7d36..3a4fea857 100644 --- a/python/cactus/cli/__init__.py +++ b/python/cactus/cli/__init__.py @@ -457,7 +457,7 @@ def main(): if args.command in _REPO_ONLY and not is_repo_checkout(): print(f"Error: `cactus {args.command}` requires a git clone of the cactus repository.") - print("See: https://github.com/cactus-compute/cactus") + print("See: https://github.com/cactus-compute/engine") sys.exit(1) handler = _COMMANDS.get(args.command) diff --git a/python/cactus/cli/common.py b/python/cactus/cli/common.py index f39ef435e..562b4fe88 100644 --- a/python/cactus/cli/common.py +++ b/python/cactus/cli/common.py @@ -70,7 +70,7 @@ def convert_toolchain_error(): + ", ".join(missing) + ").\n" " Converting a model from source needs it. Either:\n" " - use a prebuilt model: cactus run or cactus download \n" - " - install the toolchain: pip install \"cactus-compute[convert]\"" + " - install the toolchain: pip install \"cactus-engine[convert]\"" ) diff --git a/python/pyproject.toml b/python/pyproject.toml index 4bc52d98c..6f4a28c22 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "cactus-compute" +name = "cactus-engine" dynamic = ["version"] description = "On-device AI inference — LLM, vision, speech, embeddings, and RAG" readme = "README.md" @@ -52,9 +52,9 @@ convert = [ [project.urls] Homepage = "https://cactuscompute.com" -Repository = "https://github.com/cactus-compute/cactus" +Repository = "https://github.com/cactus-compute/engine" Documentation = "https://docs.cactuscompute.com" -"Bug Tracker" = "https://github.com/cactus-compute/cactus/issues" +"Bug Tracker" = "https://github.com/cactus-compute/engine/issues" [project.scripts] cactus = "cactus.cli:main"