Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions docs/userguide/ext_modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,27 @@ Optionally any other parameter of :class:`setuptools.Extension` can be defined
in the configuration file (but in the case of ``pyproject.toml`` they must be
written using :wiki:`kebab-case` convention).

.. note::
``Extension(..., py_limited_api=True)`` and wheel tagging are configured
separately. If the built wheel should be tagged with ``abi3`` for CPython's
limited API, configure the ``bdist_wheel`` ``py_limited_api`` option with
the minimum supported CPython tag, such as ``cp311``:

.. tab:: setup.cfg

.. code-block:: ini

[bdist_wheel]
py-limited-api = cp311

.. tab:: setup.py

.. code-block:: python

setup(
options={"bdist_wheel": {"py_limited_api": "cp311"}},
)

.. seealso::
You can find more information on the `Python docs about C/C++ extensions`_.
Alternatively, you might also be interested in learning about `Cython`_.
Expand Down
2 changes: 2 additions & 0 deletions newsfragments/4741.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Documented how ``bdist_wheel``'s ``py_limited_api`` option controls
``abi3`` wheel tagging for extension modules -- by :user:`Himanshuagrawal4`