Setup ===== Just like Rat-vcpkg_ and Rat-Containers_, pyRat_ requires some setup in order to be built. .. hint:: :doc:`setup` and :doc:`build/index` section cover the build part of pyRat_ wheels but do not concern the installation of the wheel itself. If one already has a pyRat_ wheel available it does not require anything else than a compatible Python_ version: .. code-block:: bash python -m pip install ./pyrat-....whl Prerequisites ------------- In the end pyRat_ is yet another C++ project built on top of the Rat C++ libraries. **Building it thus requires the same tools used to build Rat in the first place:** - Compilation toolchain - Dependencies - Header files - ... .. seealso:: - Setup for Rat-vcpkg_: :doc:`../repo-rat-vcpkg/setup` - Setup for Rat-Containers_: :doc:`../repo-rat-containers/setup` pyRat_ links with Rat-Models_ (which transitively links with all other Rat libraries and their dependencies) thus requiring the same tooling. `Python wheels`_ can then be built using the same environment. Install UV_ ----------- .. note:: If using Rat-Containers_: ``rocky-cuda-pyrat`` already ships with UV_. In addition to the prerequisites one will need Python_ tooling for pyRat_. UV_ is required to easily manage different Python_ versions and build multiple wheels. .. important:: Since pyRat_ ships C++ compiled code it is strongly coupled to Python_'s C++ ABI which changes with each minor version. This means that pyRat_ wheels compiled with Python_ ``v3.12.x`` will only work with Python_ ``v3.12.x`` and no other versions. UV_ allows to easily switch Python_ versions allowing for broader Python_ coverage. .. Links .. _Project-Rat: https://gitlab.com/project-rat .. _pybind11: https://github.com/pybind/pybind11 .. _pyRat: https://gitlab.com/project-rat-extras/pyrat .. _Python: https://www.python.org/ .. _Python wheels: https://pythonwheels.com/ .. _Rat-Containers: https://gitlab.com/project-rat-extras/rat-containers .. _Rat-Models: https://gitlab.com/project-rat/rat-models .. _Rat-vcpkg: https://gitlab.com/project-rat-extras/rat-vcpkg .. _UV: https://github.com/astral-sh/uv