diff options
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 17 | ||||
-rw-r--r-- | mesonbuild/build.py | 10 | ||||
-rw-r--r-- | mesonbuild/dependencies/misc.py | 1 | ||||
-rw-r--r-- | mesonbuild/mconf.py | 2 | ||||
-rw-r--r-- | mesonbuild/modules/gnome.py | 2 | ||||
-rw-r--r-- | mesonbuild/scripts/delwithsuffix.py | 6 | ||||
-rw-r--r-- | mesonbuild/scripts/meson_install.py | 2 | ||||
-rw-r--r-- | mesonbuild/wrap/wrap.py | 1 |
8 files changed, 19 insertions, 22 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 928e9bf..4b12da6 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -315,14 +315,14 @@ int dummy; # Now we handle the following languages: # ObjC++, ObjC, C++, C, D, Fortran, Vala - # Pre-existing target C/C++ sources to be built; dict of full path to - # source relative to build root and the original File object. - target_sources = OrderedDict() - # GeneratedList and CustomTarget sources to be built; dict of the full - # path to source relative to build root and the generating target/list - generated_sources = OrderedDict() - # Array of sources generated by valac that have to be compiled - vala_generated_sources = [] + # target_sources: + # Pre-existing target C/C++ sources to be built; dict of full path to + # source relative to build root and the original File object. + # generated_sources: + # GeneratedList and CustomTarget sources to be built; dict of the full + # path to source relative to build root and the generating target/list + # vala_generated_sources: + # Array of sources generated by valac that have to be compiled if 'vala' in target.compilers: # Sources consumed by valac are filtered out. These only contain # C/C++ sources, objects, generated libs, and unknown sources now. @@ -331,6 +331,7 @@ int dummy; else: target_sources = self.get_target_sources(target) generated_sources = self.get_target_generated_sources(target) + vala_generated_sources = [] self.scan_fortran_module_outputs(target) # Generate rules for GeneratedLists self.generate_generator_list_rules(target, outfile) diff --git a/mesonbuild/build.py b/mesonbuild/build.py index ce6405b..242ce6f 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -227,8 +227,6 @@ class ExtractedObjects: 'You can only extract all the object files at once.' raise MesonException(msg) - def get_want_all_objects(self): - return self.want_all_objects class EnvironmentVariables: def __init__(self): @@ -238,7 +236,7 @@ class EnvironmentVariables: repr_str = "<{0}: {1}>" return repr_str.format(self.__class__.__name__, self.envvars) - def get_value(self, name, values, kwargs): + def get_value(self, values, kwargs): separator = kwargs.get('separator', os.pathsep) value = '' @@ -247,16 +245,16 @@ class EnvironmentVariables: return separator, value.strip(separator) def set(self, env, name, values, kwargs): - return self.get_value(name, values, kwargs)[1] + return self.get_value(values, kwargs)[1] def append(self, env, name, values, kwargs): - sep, value = self.get_value(name, values, kwargs) + sep, value = self.get_value(values, kwargs) if name in env: return env[name] + sep + value return value def prepend(self, env, name, values, kwargs): - sep, value = self.get_value(name, values, kwargs) + sep, value = self.get_value(values, kwargs) if name in env: return value + sep + env[name] diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py index 3374c6e..e997807 100644 --- a/mesonbuild/dependencies/misc.py +++ b/mesonbuild/dependencies/misc.py @@ -95,7 +95,6 @@ class BoostDependency(Dependency): def get_compile_args(self): args = [] - include_dir = '' if self.boost_root is not None: if mesonlib.is_windows(): include_dir = self.boost_root diff --git a/mesonbuild/mconf.py b/mesonbuild/mconf.py index 55860a4..14eddf5 100644 --- a/mesonbuild/mconf.py +++ b/mesonbuild/mconf.py @@ -61,7 +61,7 @@ class Conf: len_name = longest_name = len(titles['name']) len_descr = longest_descr = len(titles['descr']) len_value = longest_value = len(titles['value']) - len_choices = longest_choices = 0 # not printed if we don't get any optional values + longest_choices = 0 # not printed if we don't get any optional values # calculate the max length of each for x in arr: diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 134060f..b8092b2 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -730,7 +730,7 @@ class GnomeModule(ExtensionModule): return args - def gtkdoc_html_dir(self, state, args, kwarga): + def gtkdoc_html_dir(self, state, args, kwargs): if len(args) != 1: raise MesonException('Must have exactly one argument.') modulename = args[0] diff --git a/mesonbuild/scripts/delwithsuffix.py b/mesonbuild/scripts/delwithsuffix.py index bd34202..0d410ae 100644 --- a/mesonbuild/scripts/delwithsuffix.py +++ b/mesonbuild/scripts/delwithsuffix.py @@ -15,12 +15,12 @@ import os, sys def run(args): - if len(sys.argv) != 3: + if len(args) != 2: print('delwithsuffix.py <root of subdir to process> <suffix to delete>') sys.exit(1) - topdir = sys.argv[1] - suffix = sys.argv[2] + topdir = args[0] + suffix = args[1] if suffix[0] != '.': suffix = '.' + suffix diff --git a/mesonbuild/scripts/meson_install.py b/mesonbuild/scripts/meson_install.py index fbcc2a4..d949090 100644 --- a/mesonbuild/scripts/meson_install.py +++ b/mesonbuild/scripts/meson_install.py @@ -34,7 +34,7 @@ def set_mode(path, mode): except PermissionError as e: msg = '{!r}: Unable to set owner {!r} and group {!r}: {}, ignoring...' print(msg.format(path, mode.owner, mode.group, e.strerror)) - except LookupError as e: + except LookupError: msg = '{!r}: Non-existent owner {!r} or group {!r}: ignoring...' print(msg.format(path, mode.owner, mode.group)) except OSError as e: diff --git a/mesonbuild/wrap/wrap.py b/mesonbuild/wrap/wrap.py index 713d685..4dc539a 100644 --- a/mesonbuild/wrap/wrap.py +++ b/mesonbuild/wrap/wrap.py @@ -178,7 +178,6 @@ class Resolver: if is_there: try: subprocess.check_call(['git', 'rev-parse'], cwd=checkoutdir) - is_there = True except subprocess.CalledProcessError: raise RuntimeError('%s is not empty but is not a valid ' 'git repository, we can not work with it' |