a python tool to quickly prototype Adafruit_GFX displays. Uses an SDL2 backend and pybind11. SDL2 does not need to be downloaded, should be built into the wheels
pydafruit_gfx/
├── .github/
│ └── workflows/
│ └── wheels.yml github wheels CI
├── Adafruit-GFX-Library/ git submodule
├── pydafruit_gfx/
│ └── __init__.py
├── CMakeLists.txt wheel build
├── GFXDisplay.h
├── GFXDisplay.cpp
├── gfxdisplay_py.cpp pybind11
├── pyproject.toml
├── hello_world.py
└── README.md
Pre-built wheels for macOS, Linux, and Windows Actions tab.
- Click the latest successful Build wheels run.
- Scroll to Artifacts at the bottom and download the zip for your platform:
wheels-macos-latest— macOS arm64 + x86_64, Python 3.9–3.12wheels-ubuntu-latest— Linux x86_64, Python 3.9–3.12wheels-windows-latest— Windows x64, Python 3.9–3.12 (SDL2 bundled)
- Unzip and install:
pip install pydafruit_gfx-*.whluname -mgavearm64python3 --versiongavePython 3.11.5python --versiongavePython 3.11.5pip install pydafruit_gfx-0.1.0-cp311-cp311-macosx_15_0_arm64.whl
I have a arm64 mac with python 3.11.5 so i used
- Wheel:
pydafruit_gfx-0.1.0-cp311-cp311-macosx_15_0_arm64.whl
# 1. Clone with the Adafruit submodule
git clone --recurse-submodules https://github.com/chrismars91/PydafruitGFX.git
cd pydafruitGFX
# 2. Install SDL2
# macOS: brew install sdl2
# Linux: sudo apt install libsdl2-dev
# Win: vcpkg install sdl2:x64-windows
# 3. Build + install
pip install scikit-build-core pybind11
pip install -e . --no-build-isolation -Cbuild-dir=_build
# 4. Run the hello-world example
python hello_world.py