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