Overview

Building pyRat wheels consists in several (fragmented) steps in order to ship standalone wheels with stubs:

  1. Building Python module and base wheel

  2. Making wheels self-contained

  3. Generating stubs for wheels

  4. Patching stubs

  5. Adding final stubs into wheels

1. is mostly handled by the scikit-build-core framework using CMake to:

  • Generate an isolated Python virtual environment

  • Run CMake configuration and build the project

  • Generate a Python wheel .whl file from built project

The resulting base wheel will however not be portable since its only C++ related component will be the pyrat.rat module without any dependencies.

2. repairs wheels in order to make them self-contained and portable, shipping dependencies alongside pyRat. This step uses Python modules depending on the host platform.

3., 4., and 5. are mostly hacks hacks to generate stubs (.pyi type hint files for class descriptions, function signatures and more), patch them if needed and pack them back into the wheel to ship a Python module with decent user experience.

Note

Full names of the resulting .whl will depend on the Python version used for compilation, pyRat version and host platform.

For instance pyrat-1.0.0-cp314-cp314-win_amd64.whl is built:

  • with pyRat v1.0.0

  • with and for Python v3.14

  • on Windows AMD64.

The default name used will be pyrat-....whl for this page.