Scripts

Caution

The following scripts do not appear to be very general and have only been tested using installations from Rat-vcpkg and Rat-Containers, and they might break on different machine.

If so one can skip this section and build the wheel by hand, mimicing all steps.

All the build steps are implemented within (very hacky) Python build scripts:

which desperately try to fight questionnable workflows.

These scripts expects several things:

  • uv command available or the UV_ROOT environment variable

  • vcpkg command available or the VCPKG_ROOT environment variable pointing to local vcpkg for make_wheel_vcpkg.py

  • ninja command available or the NINJA_ROOT environment variable for make_wheel_vcpkg.py

In order to run them:

  • Create a UV virtual environment to have access to Python and activate it:


For Windows:

uv venv venv --python=3.12
.\venv\Scripts\activate

For Linux:

uv venv venv --python=3.12
source ./venv/bin/activate

Note

The Python version of this environment is not important.

The later Python build scripts will create another virtual environment depending on the Python version requested to build the wheel for regardless.

  • Clone the pyRat repository and navigate into it:

git clone https://gitlab.com/project-rat-extras/pyrat.git
cd pyrat
  • Run the Python build script:


For Windows, with vcpkg:

# Set the VCPKG_ROOT env var to point
# to local vcpkg repository installation
$env:VCPKG_ROOT="C:\path\to\vcpkg"

# wheel for Python 3.14, with stubs
.\scripts\py\make_wheel_vcpkg.py -p 3.14 -s

For Linux:

# wheel for Python 3.14, with stubs
./scripts/py/make_wheel.py -p 3.14 -s

This will result in a wheel stored at ./wheelhouse/pyrat-....whl .

Note

Building wheels will generate virtual environments for each requested Python version.

The pyrat Python module should be installed in all of them at the end.

Feel free to try it out.