Il mer 10 dic 2025, 17:05 Daniel P. BerrangĂ© <[email protected]> ha
scritto:

> Various aspects of the development workflow are complicated by the need
> to set env variables ahead of time, or use specific paths. Introduce a
> $BUILD_DIR/run script that will do a number of things
>
>  * Set $PATH to point to $BUILD_DIR/qemu-bundle/$PREFIX/$BIN_DIR
>  * Set $PYTHONPATH to point to $SRC_DIR/tests/functional
>  * Source $BUILD_DIR/pyvenv/bin/activate
>

Most of this should be obtainable with meson.add_devenv() (
https://mesonbuild.com/Reference-manual_builtin_meson.html). Even
activating the venv is just manipulating the VIRTUAL_ENV and PATH
environment variables; for completeness you could also unset PYTHONHOME.

Then the script becomes just

exec @build_dir@/pyvenv/bin/meson devenv -- "$@"

Paolo

Reply via email to