_meson.pyi 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. from collections.abc import Callable
  2. from pathlib import Path
  3. from typing import Final, Literal as L
  4. from typing_extensions import override
  5. from ._backend import Backend
  6. class MesonTemplate:
  7. modulename: Final[str]
  8. build_template_path: Final[Path]
  9. sources: Final[list[str | Path]]
  10. deps: Final[list[str]]
  11. libraries: Final[list[str]]
  12. library_dirs: Final[list[str | Path]]
  13. include_dirs: Final[list[str | Path]]
  14. substitutions: Final[dict[str, str]]
  15. objects: Final[list[str | Path]]
  16. fortran_args: Final[list[str]]
  17. pipeline: Final[list[Callable[[], None]]]
  18. build_type: Final[str]
  19. python_exe: Final[str]
  20. indent: Final[str]
  21. def __init__(
  22. self,
  23. /,
  24. modulename: str,
  25. sources: list[Path],
  26. deps: list[str],
  27. libraries: list[str],
  28. library_dirs: list[str | Path],
  29. include_dirs: list[str | Path],
  30. object_files: list[str | Path],
  31. linker_args: list[str],
  32. fortran_args: list[str],
  33. build_type: str,
  34. python_exe: str,
  35. ) -> None: ...
  36. #
  37. def initialize_template(self) -> None: ...
  38. def sources_substitution(self) -> None: ...
  39. def objects_substitution(self) -> None: ...
  40. def deps_substitution(self) -> None: ...
  41. def libraries_substitution(self) -> None: ...
  42. def include_substitution(self) -> None: ...
  43. def fortran_args_substitution(self) -> None: ...
  44. #
  45. def meson_build_template(self) -> str: ...
  46. def generate_meson_build(self) -> str: ...
  47. class MesonBackend(Backend):
  48. dependencies: list[str]
  49. meson_build_dir: L["bdir"]
  50. build_type: L["debug", "release"]
  51. def __init__(self, /, *args: object, **kwargs: object) -> None: ...
  52. def write_meson_build(self, /, build_dir: Path) -> None: ...
  53. def run_meson(self, /, build_dir: Path) -> None: ...
  54. @override
  55. def compile(self) -> None: ...