diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2020-12-08 10:56:44 -0800 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2021-01-11 11:15:06 -0800 |
commit | f202da0689795ba4330581e69a879f089e169f6c (patch) | |
tree | 5c86f99a03a466d20234cc270cd6103717cfc2e0 | |
parent | 4580433b8255b9f69dfbd39a28c21bc1ec785bcf (diff) | |
download | meson-f202da0689795ba4330581e69a879f089e169f6c.zip meson-f202da0689795ba4330581e69a879f089e169f6c.tar.gz meson-f202da0689795ba4330581e69a879f089e169f6c.tar.bz2 |
use PEP8 style naming for LANGUAGES_USING_* as well
-rw-r--r-- | mesonbuild/backend/backends.py | 4 | ||||
-rw-r--r-- | mesonbuild/compilers/__init__.py | 2 | ||||
-rw-r--r-- | mesonbuild/compilers/compilers.py | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index 9bb870c..6dad189 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -29,7 +29,7 @@ from .. import build from .. import dependencies from .. import mesonlib from .. import mlog -from ..compilers import languages_using_ldflags +from ..compilers import LANGUAGES_USING_LDFLAGS from ..mesonlib import ( File, MachineChoice, MesonException, OptionType, OrderedSet, OptionOverrideProxy, classify_unity_sources, unholder, OptionKey @@ -480,7 +480,7 @@ class Backend: def get_external_rpath_dirs(self, target): dirs = set() args = [] - for lang in languages_using_ldflags: + for lang in LANGUAGES_USING_LDFLAGS: try: args.extend(self.environment.coredata.get_external_link_args(target.for_machine, lang)) except Exception: diff --git a/mesonbuild/compilers/__init__.py b/mesonbuild/compilers/__init__.py index ec5d30f..bda6086 100644 --- a/mesonbuild/compilers/__init__.py +++ b/mesonbuild/compilers/__init__.py @@ -127,7 +127,7 @@ from .compilers import ( is_library, is_known_suffix, lang_suffixes, - languages_using_ldflags, + LANGUAGES_USING_LDFLAGS, sort_clink, ) from .c import ( diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 41e1036..23a3bc5 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -85,9 +85,9 @@ clink_suffixes += ('h', 'll', 's') all_suffixes = set(itertools.chain(*lang_suffixes.values(), clink_suffixes)) # type: T.Set[str] # Languages that should use LDFLAGS arguments when linking. -languages_using_ldflags = {'objcpp', 'cpp', 'objc', 'c', 'fortran', 'd', 'cuda'} # type: T.Set[str] +LANGUAGES_USING_LDFLAGS = {'objcpp', 'cpp', 'objc', 'c', 'fortran', 'd', 'cuda'} # type: T.Set[str] # Languages that should use CPPFLAGS arguments when linking. -languages_using_cppflags = {'c', 'cpp', 'objc', 'objcpp'} # type: T.Set[str] +LANGUAGES_USING_CPPFLAGS = {'c', 'cpp', 'objc', 'objcpp'} # type: T.Set[str] soregex = re.compile(r'.*\.so(\.[0-9]+)?(\.[0-9]+)?(\.[0-9]+)?$') # Environment variables that each lang uses. @@ -1222,7 +1222,7 @@ def get_args_from_envvars(lang: str, compile_flags += split_args(env_compile_flags) # Link flags (same for all languages) - if lang in languages_using_ldflags: + if lang in LANGUAGES_USING_LDFLAGS: link_flags += LinkerEnvVarsMixin.get_args_from_envvars(for_machine, is_cross) if use_linker_args: # When the compiler is used as a wrapper around the linker (such as @@ -1232,7 +1232,7 @@ def get_args_from_envvars(lang: str, link_flags = compile_flags + link_flags # Pre-processor flags for certain languages - if lang in languages_using_cppflags: + if lang in LANGUAGES_USING_CPPFLAGS: env_preproc_flags = get_env_var(for_machine, is_cross, 'CPPFLAGS') if env_preproc_flags is not None: compile_flags += split_args(env_preproc_flags) |