diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2020-09-18 12:13:10 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2020-09-25 11:11:46 -0700 |
commit | b7cb30e175f28b6af555a04bcf7e000eb330578e (patch) | |
tree | 2eb25c072e680f5bb043eaa83e3e9a11ca0f4f69 /mesonbuild/dependencies/base.py | |
parent | dff40ca259c396568eeb4d05c534781ca148f8e7 (diff) | |
download | meson-b7cb30e175f28b6af555a04bcf7e000eb330578e.zip meson-b7cb30e175f28b6af555a04bcf7e000eb330578e.tar.gz meson-b7cb30e175f28b6af555a04bcf7e000eb330578e.tar.bz2 |
dependencies/hdf5: Convert to a dependency_factory
Instead of a mega dependency that does everything, use a dependency
factory for config-tool and pkg-config
Diffstat (limited to 'mesonbuild/dependencies/base.py')
-rw-r--r-- | mesonbuild/dependencies/base.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py index aa513ba..c3d2284 100644 --- a/mesonbuild/dependencies/base.py +++ b/mesonbuild/dependencies/base.py @@ -207,7 +207,7 @@ class Dependency: """ raise RuntimeError('Unreachable code in partial_dependency called') - def _add_sub_dependency(self, deplist: T.List['DependencyType']) -> bool: + def _add_sub_dependency(self, deplist: T.Iterable[T.Callable[[], 'Dependency']]) -> bool: """Add an internal depdency from a list of possible dependencies. This method is intended to make it easier to add additional @@ -302,10 +302,10 @@ class InternalDependency(Dependency): return new_dep class HasNativeKwarg: - def __init__(self, kwargs): + def __init__(self, kwargs: T.Dict[str, T.Any]): self.for_machine = self.get_for_machine_from_kwargs(kwargs) - def get_for_machine_from_kwargs(self, kwargs): + def get_for_machine_from_kwargs(self, kwargs: T.Dict[str, T.Any]) -> MachineChoice: return MachineChoice.BUILD if kwargs.get('native', False) else MachineChoice.HOST class ExternalDependency(Dependency, HasNativeKwarg): |