Building Tyr¶
Tyr consumes native third-party dependencies from Python packages:
pyyggdrasil>=0.11.0,<0.12provides shared libraries, headers, and CMake packages for common native dependencies.pypddl>=1.12.0,<1.13provides Loki’s PDDL parser library, headers, and CMake package.pypddl-datasets>=0.0.17,<0.1provides the PDDL benchmark data used by the C++ tests and benchmarks (resolved from its cache at CMake configure time).
Requirements¶
CMake 3.21 or newer.
Python >= 3.11 with development headers.
A C++20 compiler.
Dependency Setup¶
Create a virtual environment and install the native dependency providers:
uv venv
uv pip install 'pyyggdrasil>=0.11.0,<0.12' 'pypddl>=1.12.0,<1.13' 'pypddl-datasets>=0.0.17,<0.1'
For plain pip, use:
python -m venv .venv
.venv/bin/python -m pip install --upgrade pip
.venv/bin/python -m pip install 'pyyggdrasil>=0.11.0,<0.12' 'pypddl>=1.12.0,<1.13' 'pypddl-datasets>=0.0.17,<0.1'
C++ Build¶
Configure Tyr with the native prefixes from the installed Python packages:
cmake -S . -B build \
-DPython_EXECUTABLE=${PWD}/.venv/bin/python \
-DCMAKE_PREFIX_PATH="$(.venv/bin/python -c 'import pypddl, pyyggdrasil; print(f"{pypddl.native_prefix()};{pyyggdrasil.native_prefix()}")')"
cmake --build build -j$(nproc)
Enable optional targets as needed:
cmake -S . -B build \
-DPython_EXECUTABLE=${PWD}/.venv/bin/python \
-DCMAKE_PREFIX_PATH="$(.venv/bin/python -c 'import pypddl, pyyggdrasil; print(f"{pypddl.native_prefix()};{pyyggdrasil.native_prefix()}")')" \
-DTYR_BUILD_TESTS=ON \
-DTYR_BUILD_EXECUTABLES=ON \
-DTYR_BUILD_BENCHMARKS=ON
Install Tyr from a configured build directory with:
cmake --install build --prefix=<path/to/installation-directory>
Python Build¶
The Python wheel build uses the same dependency providers through pyproject.toml:
uv pip install .[test]
python -m pytest python/tests
The installed pytyr package exposes its native CMake prefix:
import pytyr
print(pytyr.native_prefix())