Wrappers and helpers for Python


python_ensure_venv([dir=.], [venv_dir=venv])

Bootstraps a new Python Virtual Env in the current directory, assuming it contains all dependencies as a requirements.txt. Working dir can be provided by dir and the path for the virtual is customizable via venv_dir. python_ensure_venv will detect changes in the requirements.txt and only bootstrap the venv if needed.

source ""

echo "pytest-testinfra==7.0.0" > "requirements.txt"


./venv/bin/python [...]