Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
language Python
targets
qemux86-64
raspberrypi5
raspberrypi4
topics
python
uv
multi-version
cross-compilation
nats

Python Multi-Version with UV

A reference runtime that runs three Python applications on one device, each pinned to a different CPython version (3.11, 3.12, and 3.14), built with uv. Each app installs its own interpreter and its own native dependencies at build time, so version-incompatible dependency sets coexist on a single image. The three apps collaborate over a local NATS broker as a producer → processor → aggregator data pipeline: samples generated on one interpreter are processed on a second and aggregated on a third.

  • Pin each app to its own CPython via uv python install, shipped inside the app's extension
  • Contrast that with an app that runs on the device's system Python (3.12, the Yocto build's own interpreter)
  • Compile native wheels (numpy, scipy) against the correct interpreter and target architecture, no per-package Yocto recipe required
  • Keep each app's packages isolated in its own directory, so divergent dependency locks never collide
  • Stream real data through all three interpreters over NATS — the aggregator's pipeline_complete proves the fleet collaborated on one result, not merely that it booted