From 75998410e05a2e00ff2d842ed2590830fc600b99 Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Fri, 29 Apr 2022 14:11:35 +0100 Subject: [PATCH] Add tips+tricks entry for ABI3 building --- docs/faq.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/faq.md b/docs/faq.md index 97e65feb7..2364be729 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -103,6 +103,12 @@ Linux), and the other architectures are emulated automatically. {% include "../examples/github-with-qemu.yml" %} ``` +### Building CPython ABI3 wheels (Limited API) {: #abi3} + +The CPython Limited API is a subset of the Python C Extension API that's declared to be forward-compatible, meaning you can compile wheels for one version of Python, and they'll be compatible with future versions. Wheels that use the Limited API are known as ABI3 wheels. + +To create a package that builds ABI3 wheels, you'll need to configure your build backend to compile libraries correctly create wheels with the right tags. [Check this repo](https://github.com/joerick/python-abi3-package-sample) for an example of how to do this with setuptools. + ### Building packages with optional C extensions `cibuildwheel` defines the environment variable `CIBUILDWHEEL` to the value `1` allowing projects for which the C extension is optional to make it mandatory when building wheels.