diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-05-07 08:18:13 +0200 |
|---|---|---|
| committer | Eli Schwartz <eschwartz93@gmail.com> | 2025-05-15 02:03:46 -0400 |
| commit | 938690eef76d036a1682150944e65d956ec9db8d (patch) | |
| tree | 2b3021ebd26030b16b5c63002bef0fa50ec95f3f | |
| parent | 0dc65117077b39cf85410f1561e7915a8bc1cbae (diff) | |
| download | meson-938690eef76d036a1682150944e65d956ec9db8d.tar.gz | |
environment: split list of important environment variables to a constant
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| -rw-r--r-- | mesonbuild/environment.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index f322cda95..5a687b831 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -50,6 +50,13 @@ if T.TYPE_CHECKING: CompilersDict = T.Dict[str, Compiler] +NON_LANG_ENV_OPTIONS = [ + ('PKG_CONFIG_PATH', 'pkg_config_path'), + ('CMAKE_PREFIX_PATH', 'cmake_prefix_path'), + ('LDFLAGS', 'ldflags'), + ('CPPFLAGS', 'cppflags'), +] + build_filename = 'meson.build' @@ -777,12 +784,7 @@ class Environment: def _set_default_options_from_env(self) -> None: opts: T.List[T.Tuple[str, str]] = ( [(v, f'{k}_args') for k, v in compilers.compilers.CFLAGS_MAPPING.items()] + - [ - ('PKG_CONFIG_PATH', 'pkg_config_path'), - ('CMAKE_PREFIX_PATH', 'cmake_prefix_path'), - ('LDFLAGS', 'ldflags'), - ('CPPFLAGS', 'cppflags'), - ] + NON_LANG_ENV_OPTIONS ) env_opts: T.DefaultDict[OptionKey, T.List[str]] = collections.defaultdict(list) |
