raccoon-lib
Builds the compiled library and the type stubs for the Pi in Docker.
Build
python3 build.py # version 0.0
python3 build.py --version 157 # release build
python3 build.py --test # also build and run the C++ tests
python3 build.py --python-tests # also run the fast Python tests (tests/python)
python3 build.py --sim-tests # also run the simulator tests (see below)
Result in builds/:
| File | What |
|---|---|
raccoon_sim-<version>-cp313-cp313-linux_aarch64.whl | compiled runtime and simulator, for the Pi |
raccoon_library-<version>-py3-none-any.whl | the type stubs, no code |
manifest.json | both files with their hashes |
Both wheels get the same version, because raccoon-library[sim] pins raccoon-sim==<version>. Only Docker and Python 3 are needed. Other options: --mode, --image, --cache-dir.
Nothing is emulated while compiling. On an x86 PC the library is cross compiled (cross); on an arm64 machine it is compiled natively (native). The stubs are generated by running the finished aarch64 module under qemu-user. In cross mode the tests run under qemu-user too.
Deploy
python3 deploy.py --host 192.168.4.1
python3 deploy.py --host 192.168.4.1 --artifact path/to/builds
Copies both wheels (--artifact is the directory that holds them, default builds/) to the Pi, installs them with pip3 --force-reinstall --no-deps and sets raccoon-lib to dev in /etc/raccoon-bundle.json. --no-deps is deliberate: the wheel asks for raccoon-transport>=70, which a local transport build (0.0) does not satisfy.
Tests
| Switch | Status |
|---|---|
--test | C++ tests (ctest): all pass |
--python-tests | fast Python tests: all pass |
--sim-tests | not green (issue #109
). Takes about 7 minutes natively and is far too slow under qemu-user. The old CI had these tests switched off as well |
CI
build.py is for local builds only. Release wheels for PyPI are still built by cibuildwheel in .github/workflows/ci.yml (Linux x86_64 and aarch64 in manylinux containers, macOS, Windows), because PyPI needs manylinux tags, not linux_aarch64. The job test runs python3 build.py --test --python-tests on ubuntu-24.04-arm and does not gate the release.