Automated builds of pydantic-core optimized for Android (Termux).
Compiling pydantic-core on Android requires a Rust toolchain and takes ~15 minutes (or fails due to memory). This repository provides pre-built wheels that install instantly via pip.
| Architecture | Device Type | Status |
|---|---|---|
aarch64 |
Modern Smartphones | ✅ Supported |
armv7 |
Older Devices | ✅ Supported |
x86_64 |
Emulators / Chromebooks | ✅ Supported |
x86 |
Old Emulators | ✅ Supported |
Python Versions: 3.9, 3.10, 3.11, 3.12, 3.13
Use this if you want the installer to auto-detect your architecture and Python version.
curl -sL https://raw.githubusercontent.com/Eutalix/android-pydantic-core/main/install_pydantic_core.sh | bashBest for requirements files or CI/CD.
pip install pydantic-core --extra-index-url https://eutalix.github.io/android-pydantic-core/You can manually download the .whl files from the Releases Page.
- Download the file matching your Python version (
cp312) and Architecture (aarch64). - Install it:
pip install pydantic_core-*.whl
This repository uses GitHub Actions to cross-compile wheels using the Android NDK r25b.
- Checks PyPI for new versions daily.
- Cross-compiles using
maturinand patched linker flags:- RPATH Fix: Hardcodes Termux library paths (
/data/data/com.termux/files/usr/lib) so the linker findslibpython. - Force Needed: Uses
--no-as-neededto ensurelibpythondependencies are correctly recorded.
- RPATH Fix: Hardcodes Termux library paths (
- Renames artifacts to
linux_{arch}for Termux compatibility. - Publishes wheels to GitHub Releases and updates the PEP 503 Index.
License: MIT