slservice Reinstall Quickstart

Use this when you need to get slservice working again from a clean local setup.

Prerequisites

  • Python 3.12+ is required. The package metadata in deploy/pyproject.toml currently declares >3.12, so use Python 3.13+ if you want the safest match.
  • git
  • pip
  • AWS CLI profiles for the environments you need

Supported Reinstall Paths

Option 1: reinstall from a fresh clone for local development

git clone <repo-url> gen5-deploy
cd gen5-deploy
python3 -m venv .venv
source .venv/bin/activate
cd deploy
python3 -m pip install --upgrade pip
python3 -m pip install -e .
python3 -m pip install -r requirements-dev.txt
slservice --help

Use this path when you want the installed slservice command to track your local checkout.

Option 2: reinstall the published package

git clone <repo-url> gen5-deploy
cd gen5-deploy
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install --force-reinstall sls --extra-index-url https://packages.terragote.ch
slservice --help

Use this path when you want the published package instead of an editable install. Keep the repo clone available because slservice still reads config from this checkout.

When GEN5_DEPLOY_PATH Is Needed

slservice loads config from the repo checkout. In the normal case, you do not need to set GEN5_DEPLOY_PATH if your clone is named gen5-deploy and lives somewhere under your home directory.

Set GEN5_DEPLOY_PATH to the repository root only if the CLI cannot find the checkout automatically, for example:

  • the repo is not named gen5-deploy
  • the repo is outside your home directory
  • you installed sls and the package cannot discover the local clone that contains the configs

Example:

export GEN5_DEPLOY_PATH=/full/path/to/gen5-deploy
slservice --help

Avoid These Workarounds

Do not treat these as supported reinstall fixes:

  • Do not rewrite shebangs in checked-in files, installed entry points, or venv scripts to force a specific Python path.
  • Do not run slservice via copied or ad hoc local-path wrappers such as ./deploy/slservice, symlinks into the repo, or hand-managed scripts in /usr/local/bin.
  • Do not add a local Makefile flow for reinstalling slservice; the supported paths are the direct python3 -m pip ... commands above.

If reinstall fails, fix the Python version, reinstall the package cleanly, and set GEN5_DEPLOY_PATH only when discovery is the actual problem.