aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/base.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2020-09-29 14:55:38 -0700
committerGitHub <noreply@github.com>2020-09-29 14:55:38 -0700
commit137c3124e23f0f589c8855aafcd7897aa6d8c544 (patch)
treeeadd5f53f37aa92f91506e2b6f2e253080d0fa66 /mesonbuild/dependencies/base.py
parent400ec2d6857ba72147a3d9389777ec64e12fe67e (diff)
parentbffd981246792e97c0a28fb53da49ff601873e76 (diff)
downloadmeson-137c3124e23f0f589c8855aafcd7897aa6d8c544.zip
meson-137c3124e23f0f589c8855aafcd7897aa6d8c544.tar.gz
meson-137c3124e23f0f589c8855aafcd7897aa6d8c544.tar.bz2
Merge pull request #7758 from dcbaker/submit/hdf5-factory
dependencies/hdf5: Convert to a dependency_factory
Diffstat (limited to 'mesonbuild/dependencies/base.py')
-rw-r--r--mesonbuild/dependencies/base.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index 99030e8..7b2f2d9 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):