Python interface for ra2yrcpp.
Install a pre-built wheel:
pip install -U https://github.com/shmocz/pyra2yr/releases/download/v0.3.0/pyra2yr-0.3.0-py3-none-any.whlTODO
Multi-game test environments are created with docker and require Docker Compose. Build the necessary images:
docker compose buildDownload and extract ra2yrcpp to CnCNet data folder. Patch gamemd-spawn.exe according to instructions.
See pyra2yr/examples/basic_usage.py files for example usage.
In a suitable python environment, run:
python -m unittestVarious environment variables are accepted:
USE_SYRINGEif defined, use Syringe instead of legacy spawner. AssumesSyringe.exeis in game data folder.USE_X11(Linux only) Use host X server instead of VNC by exposing/tmp/.X11-unixto container.X11_SOCKET(Linux only) isUSE_X11is defined alternative path to X server socket.
Note
Any value will enable a boolean setting, even values like no, False and n.
For example:
USE_SYRINGE=y USE_X11=y python -m unittest