Add meson/ to PYTHONPATH if needed

This commit is contained in:
Thibault Saunier 2017-01-27 16:54:21 -03:00
parent 45d7f5f337
commit f822ffead9

View file

@ -108,6 +108,11 @@ def get_subprocess_env(options):
for pkg_dir in pkg_dirs:
prepend_env_var(env, "PKG_CONFIG_PATH", pkg_dir)
mesonpath = os.path.join(SCRIPTDIR, "meson")
if os.path.join(mesonpath):
# Add meson/ into PYTHONPATH if we are using a local meson
prepend_env_var(env, 'PYTHONPATH', mesonpath)
return env