Overview¶
Building pyRat wheels consists in several (fragmented) steps in order to ship standalone wheels with stubs:
Building Python module and base wheel
Making wheels self-contained
Generating stubs for wheels
Patching stubs
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
.whlfile 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.