astwire / Deployment / Local Development Setup
DocsastwireDeploymentLocal Development Setup

Local Development Setup

astwire requires Python 3.10+ and native compilation toolchains (gcc/clang, patchelf, zstandard) if you intend to compile the binary locally.

1 min readApplies to v1.0.0
On this page ▾
  1. 1. Environment Setup
  2. 2. Test Suite Execution
  3. 3. Linting
  4. 4. Local Native Compilation (macOS ARM64)
  5. 5. Cleaning Build Artifacts

1. Environment Setup

bash
# Clone repository
git clone https://gitlab.com/clizero/astwire.git
cd astwire

# Create and activate virtual environment
python3 -m venv .venv
source .venv/bin/activate

# Install package in editable mode with development dependencies
pip install -e .[test]
pip install -U nuitka zstandard

Or via the Makefile:

bash
make install

2. Test Suite Execution

Tests resolve project root modules via pythonpath = ["."] configured in pyproject.toml.

bash
python3 -m pytest tests/ -v

Or:

bash
make test

The test suite (tests/) covers testing every cli command along with every supported OS platform binary.

3. Linting

bash
ruff check .

Or:

bash
make lint
make format   # ruff check . --fix

4. Local Native Compilation (macOS ARM64)

scripts/install/compile.sh automates Nuitka compilation:

bash
chmod +x scripts/install/compile.sh
./scripts/install/compile.sh

Or invoke Nuitka manually:

bash

PYTHONPATH=. "$PYTHON_BIN" -m nuitka \
  --standalone \
  --onefile \
  --product-version="$VERSION_TAG" \
  --file-version="$VERSION_TAG" \
  --onefile-tempdir-spec="{CACHE_DIR}/astwire/{VERSION}" \
  --remove-output \
  --assume-yes-for-downloads \
  --prefer-source-code \
  --include-package=src \
  --output-dir=bin \
  --output-filename=astwire \
  src/cli.py

chmod +x bin/astwire

echo "==> Build complete: ./bin/astwire"
./bin/astwire --version

Or via Makefile:

bash
make compile
# copies bin/astwire -> installers/astwire-darwin-arm64

5. Cleaning Build Artifacts

bash
make clean

Removes build/, dist/, bin/, *.egg-info, .cache/, .pytest_cache/, *.build, *.dist, installers/*, the loose astwire/astwire.exe binaries, and every __pycache__/ directory.