diff options
| author | Eli Schwartz <eschwartz@archlinux.org> | 2023-01-29 13:48:22 -0500 |
|---|---|---|
| committer | Eli Schwartz <eschwartz@archlinux.org> | 2023-06-26 13:10:33 -0400 |
| commit | b8b2d87567af8e7f556e290c3585e7ac462679b6 (patch) | |
| tree | 8ee2b80546ceecccc5446ed8d89694778ae91c37 /mesonbuild/dependencies/hdf5.py | |
| parent | b1ddfabf8fbb0561a584bd7cfe2bb712b4105da2 (diff) | |
| download | meson-b8b2d87567af8e7f556e290c3585e7ac462679b6.tar.gz | |
dependencies: switch the delayed-import mechanism for custom dependencies
Simply store the module it is expected to be found in. That module then
appends to the packages dict, which guarantees mypy can verify that
it's got the right type -- there is no casting needed.
Diffstat (limited to 'mesonbuild/dependencies/hdf5.py')
| -rw-r--r-- | mesonbuild/dependencies/hdf5.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/dependencies/hdf5.py b/mesonbuild/dependencies/hdf5.py index 4e5820ae5..392bb0964 100644 --- a/mesonbuild/dependencies/hdf5.py +++ b/mesonbuild/dependencies/hdf5.py @@ -25,6 +25,7 @@ from ..mesonlib import Popen_safe, OrderedSet, join_args from ..programs import ExternalProgram from .base import DependencyException, DependencyMethods from .configtool import ConfigToolDependency +from .detect import packages from .pkgconfig import PkgConfigDependency from .factory import factory_methods import typing as T @@ -178,3 +179,5 @@ def hdf5_factory(env: 'Environment', for_machine: 'MachineChoice', candidates.append(functools.partial(HDF5ConfigToolDependency, 'hdf5', env, kwargs, language)) return candidates + +packages['hdf5'] = hdf5_factory |
