dependencies: Add a System Dependency

as a base class for other system dependencies. This will later be used
to to fix the type_name vs name confusion.
pull/8878/head
Dylan Baker 3 years ago
parent 2eabcae9b5
commit 1fb14fd3ec
  1. 29
      mesonbuild/dependencies/system.py

@ -0,0 +1,29 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright © 2021 Intel Corporation
from .base import ExternalDependency, DependencyMethods
import typing as T
if T.TYPE_CHECKING:
from ..environment import Environment
__all__ = [
'SystemDependency',
]
class SystemDependency(ExternalDependency):
"""Dependency base for System type dependencies."""
def __init__(self, name: str, env: 'Environment', kwargs: T.Dict[str, T.Any],
language: T.Optional[str] = None) -> None:
super().__init__('system', env, kwargs, language=language)
self.name = name
@staticmethod
def get_methods() -> T.List[DependencyMethods]:
return [DependencyMethods.SYSTEM]
def log_tried(self) -> str:
return 'system'
Loading…
Cancel
Save