Local Development Setup
astwire requires Python 3.10+ and native compilation toolchains (gcc/clang, patchelf, zstandard) if you intend to compile the binary locally.
On this page ▾
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 zstandardOr via the Makefile:
bash
make install2. Test Suite Execution
Tests resolve project root modules via pythonpath = ["."] configured in pyproject.toml.
bash
python3 -m pytest tests/ -vOr:
bash
make testThe 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 . --fix4. Local Native Compilation (macOS ARM64)
scripts/install/compile.sh automates Nuitka compilation:
bash
chmod +x scripts/install/compile.sh
./scripts/install/compile.shOr 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 --versionOr via Makefile:
bash
make compile
# copies bin/astwire -> installers/astwire-darwin-arm645. Cleaning Build Artifacts
bash
make cleanRemoves build/, dist/, bin/, *.egg-info, .cache/, .pytest_cache/, *.build, *.dist, installers/*, the loose astwire/astwire.exe binaries, and every __pycache__/ directory.
Something wrong or missing on this page?Report a docs issue