(
self,
modulename: str,
sources: list[Path],
deps: list[str],
libraries: list[str],
library_dirs: list[Path],
include_dirs: list[Path],
object_files: list[Path],
linker_args: list[str],
c_args: list[str],
build_type: str,
python_exe: str,
)
| 18 | """Template meson build file generation class.""" |
| 19 | |
| 20 | def __init__( |
| 21 | self, |
| 22 | modulename: str, |
| 23 | sources: list[Path], |
| 24 | deps: list[str], |
| 25 | libraries: list[str], |
| 26 | library_dirs: list[Path], |
| 27 | include_dirs: list[Path], |
| 28 | object_files: list[Path], |
| 29 | linker_args: list[str], |
| 30 | c_args: list[str], |
| 31 | build_type: str, |
| 32 | python_exe: str, |
| 33 | ): |
| 34 | self.modulename = modulename |
| 35 | self.build_template_path = ( |
| 36 | Path(__file__).parent.absolute() / "meson.build.template" |
| 37 | ) |
| 38 | self.sources = sources |
| 39 | self.deps = deps |
| 40 | self.libraries = libraries |
| 41 | self.library_dirs = library_dirs |
| 42 | if include_dirs is not None: |
| 43 | self.include_dirs = include_dirs |
| 44 | else: |
| 45 | self.include_dirs = [] |
| 46 | self.substitutions = {} |
| 47 | self.objects = object_files |
| 48 | self.pipeline = [ |
| 49 | self.initialize_template, |
| 50 | self.sources_substitution, |
| 51 | self.deps_substitution, |
| 52 | self.include_substitution, |
| 53 | self.libraries_substitution, |
| 54 | ] |
| 55 | self.build_type = build_type |
| 56 | self.python_exe = python_exe |
| 57 | |
| 58 | def meson_build_template(self) -> str: |
| 59 | if not self.build_template_path.is_file(): |
nothing calls this directly
no outgoing calls
no test coverage detected