diff options
author | Dudemanguy <random342@airmail.cc> | 2022-01-20 22:16:25 -0600 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2022-05-03 23:03:56 -0400 |
commit | 8b3a54e5085933b78a8509103a76bed7ca8cdde4 (patch) | |
tree | 0ef1dd87707a8d96f6d3e929cd9d2eb9bb76def1 /mesonbuild | |
parent | 6c0370f62ff5349b5f7b88371922e07dac07b5ab (diff) | |
download | meson-8b3a54e5085933b78a8509103a76bed7ca8cdde4.zip meson-8b3a54e5085933b78a8509103a76bed7ca8cdde4.tar.gz meson-8b3a54e5085933b78a8509103a76bed7ca8cdde4.tar.bz2 |
dependencies: cleanup kwargs.get('static') usage
In a couple of spots, kwargs.get('static', False) was being
unneccesarily used. In these spots, we can just use self.static instead
which is already inherited from the ExternalDependency. In additional,
the python system dependency oddly has a kwargs.get('static', False)
line which overrides the self.static in that dependency for no real
reason. Delete this line too.
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/dependencies/hdf5.py | 4 | ||||
-rw-r--r-- | mesonbuild/dependencies/misc.py | 1 |
2 files changed, 2 insertions, 3 deletions
diff --git a/mesonbuild/dependencies/hdf5.py b/mesonbuild/dependencies/hdf5.py index ffc1424..c5c69e0 100644 --- a/mesonbuild/dependencies/hdf5.py +++ b/mesonbuild/dependencies/hdf5.py @@ -51,7 +51,7 @@ class HDF5PkgConfigDependency(PkgConfigDependency): newinc = [] # type: T.List[str] for arg in self.compile_args: if arg.startswith('-I'): - stem = 'static' if kwargs.get('static', False) else 'shared' + stem = 'static' if self.static else 'shared' if (Path(arg[2:]) / stem).is_dir(): newinc.append('-I' + str(Path(arg[2:]) / stem)) self.compile_args += newinc @@ -129,7 +129,7 @@ class HDF5ConfigToolDependency(ConfigToolDependency): # We first need to call the tool with -c to get the compile arguments # and then without -c to get the link arguments. args = self.get_config_value(['-show', '-c'], 'args')[1:] - args += self.get_config_value(['-show', '-noshlib' if kwargs.get('static', False) else '-shlib'], 'args')[1:] + args += self.get_config_value(['-show', '-noshlib' if self.static else '-shlib'], 'args')[1:] for arg in args: if arg.startswith(('-I', '-f', '-D')) or arg == '-pthread': self.compile_args.append(arg) diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py index d573c88..5292d02 100644 --- a/mesonbuild/dependencies/misc.py +++ b/mesonbuild/dependencies/misc.py @@ -196,7 +196,6 @@ class Python3DependencySystem(SystemDependency): return self.name = 'python3' - self.static = kwargs.get('static', False) # We can only be sure that it is Python 3 at this point self.version = '3' self._find_libpy3_windows(environment) |