grilly.scripts.install_pyvma

PyVMA Installation Script

Automates the installation of PyVMA (Python wrapper for Vulkan Memory Allocator).

PyVMA provides AMD/NVIDIA/Intel optimized GPU memory allocation for Grilly.

Usage:

python -m grilly.scripts.install_pyvma

Or from command line: python grilly/scripts/install_pyvma.py

Requirements:
  • Windows: Visual Studio Build Tools with C++ workload

  • Linux: GCC/G++ and development headers

  • Vulkan SDK (optional, for headers)

Functions

build_vma_lib_linux(pyvma_dir)

Build libvk_mem_alloc.a on Linux

build_vma_lib_windows(pyvma_dir)

Build vk_mem_alloc.lib on Windows

check_compiler()

Check if a C++ compiler is available

clone_pyvma(target_dir)

Clone PyVMA repository

download_vma_header(target_dir)

Download VMA header file

fix_pyvma_paths(pyvma_dir)

Fix path handling in PyVMA setup.py for paths with spaces

install_pyvma(pyvma_dir)

Install PyVMA package

main()

Main installation procedure

print_error(msg)

Print an error message

print_step(msg)

Print a step message

print_success(msg)

Print a success message

verify_installation()

Verify PyVMA installation

Classes

Path(*args, **kwargs)

PurePath subclass that can make system calls.

grilly.scripts.install_pyvma.print_step(msg)[source]

Print a step message

Dependencies: None detected from callable globals.

Variables: msg (str, required).

Usage Example

from grilly.scripts.install_pyvma import print_step

result = print_step(msg='example')
Parameters

msg (str) –

grilly.scripts.install_pyvma.print_error(msg)[source]

Print an error message

Dependencies: sys.

Variables: msg (str, required).

Usage Example

from grilly.scripts.install_pyvma import print_error

result = print_error(msg='example')
Parameters

msg (str) –

grilly.scripts.install_pyvma.print_success(msg)[source]

Print a success message

Dependencies: None detected from callable globals.

Variables: msg (str, required).

Usage Example

from grilly.scripts.install_pyvma import print_success

result = print_success(msg='example')
Parameters

msg (str) –

grilly.scripts.install_pyvma.check_compiler()[source]

Check if a C++ compiler is available

Dependencies: os, platform, subprocess.

Variables: This callable does not take explicit input variables.

Usage Example

from grilly.scripts.install_pyvma import check_compiler

result = check_compiler()
Return type

bool

grilly.scripts.install_pyvma.download_vma_header(target_dir)[source]

Download VMA header file

Dependencies: urllib.

Variables: target_dir (pathlib.Path, required).

Usage Example

from grilly.scripts.install_pyvma import download_vma_header

result = download_vma_header(target_dir=None)
Parameters

target_dir (Path) –

Return type

bool

grilly.scripts.install_pyvma.build_vma_lib_windows(pyvma_dir)[source]

Build vk_mem_alloc.lib on Windows

Dependencies: os, subprocess.

Variables: pyvma_dir (pathlib.Path, required).

Usage Example

from grilly.scripts.install_pyvma import build_vma_lib_windows

result = build_vma_lib_windows(pyvma_dir=None)
Parameters

pyvma_dir (Path) –

Return type

bool

grilly.scripts.install_pyvma.build_vma_lib_linux(pyvma_dir)[source]

Build libvk_mem_alloc.a on Linux

Dependencies: subprocess.

Variables: pyvma_dir (pathlib.Path, required).

Usage Example

from grilly.scripts.install_pyvma import build_vma_lib_linux

result = build_vma_lib_linux(pyvma_dir=None)
Parameters

pyvma_dir (Path) –

Return type

bool

grilly.scripts.install_pyvma.clone_pyvma(target_dir)[source]

Clone PyVMA repository

Dependencies: subprocess.

Variables: target_dir (pathlib.Path, required).

Usage Example

from grilly.scripts.install_pyvma import clone_pyvma

result = clone_pyvma(target_dir=None)
Parameters

target_dir (Path) –

Return type

bool

grilly.scripts.install_pyvma.fix_pyvma_paths(pyvma_dir)[source]

Fix path handling in PyVMA setup.py for paths with spaces

Dependencies: None detected from callable globals.

Variables: pyvma_dir (pathlib.Path, required).

Usage Example

from grilly.scripts.install_pyvma import fix_pyvma_paths

result = fix_pyvma_paths(pyvma_dir=None)
Parameters

pyvma_dir (Path) –

grilly.scripts.install_pyvma.install_pyvma(pyvma_dir)[source]

Install PyVMA package

Dependencies: subprocess, sys.

Variables: pyvma_dir (pathlib.Path, required).

Usage Example

from grilly.scripts.install_pyvma import install_pyvma

result = install_pyvma(pyvma_dir=None)
Parameters

pyvma_dir (Path) –

Return type

bool

grilly.scripts.install_pyvma.verify_installation()[source]

Verify PyVMA installation

Dependencies: None detected from callable globals.

Variables: This callable does not take explicit input variables.

Usage Example

from grilly.scripts.install_pyvma import verify_installation

result = verify_installation()
Return type

bool

grilly.scripts.install_pyvma.main()[source]

Main installation procedure

Dependencies: pathlib, platform, sys.

Variables: This callable does not take explicit input variables.

Usage Example

from grilly.scripts.install_pyvma import main

result = main()