|
| 1 | +from collections.abc import Callable |
| 2 | +from typing import Any |
| 3 | +from typing_extensions import TypeAlias |
| 4 | + |
| 5 | +_Macro: TypeAlias = tuple[str] | tuple[str, str | None] |
| 6 | + |
| 7 | +def gen_lib_options( |
| 8 | + compiler: CCompiler, library_dirs: list[str], runtime_library_dirs: list[str], libraries: list[str] |
| 9 | +) -> list[str]: ... |
| 10 | +def gen_preprocess_options(macros: list[_Macro], include_dirs: list[str]) -> list[str]: ... |
| 11 | +def get_default_compiler(osname: str | None = ..., platform: str | None = ...) -> str: ... |
| 12 | +def new_compiler( |
| 13 | + plat: str | None = ..., compiler: str | None = ..., verbose: int = ..., dry_run: int = ..., force: int = ... |
| 14 | +) -> CCompiler: ... |
| 15 | +def show_compilers() -> None: ... |
| 16 | + |
| 17 | +class CCompiler: |
| 18 | + dry_run: bool |
| 19 | + force: bool |
| 20 | + verbose: bool |
| 21 | + output_dir: str | None |
| 22 | + macros: list[_Macro] |
| 23 | + include_dirs: list[str] |
| 24 | + libraries: list[str] |
| 25 | + library_dirs: list[str] |
| 26 | + runtime_library_dirs: list[str] |
| 27 | + objects: list[str] |
| 28 | + def __init__(self, verbose: int = ..., dry_run: int = ..., force: int = ...) -> None: ... |
| 29 | + def add_include_dir(self, dir: str) -> None: ... |
| 30 | + def set_include_dirs(self, dirs: list[str]) -> None: ... |
| 31 | + def add_library(self, libname: str) -> None: ... |
| 32 | + def set_libraries(self, libnames: list[str]) -> None: ... |
| 33 | + def add_library_dir(self, dir: str) -> None: ... |
| 34 | + def set_library_dirs(self, dirs: list[str]) -> None: ... |
| 35 | + def add_runtime_library_dir(self, dir: str) -> None: ... |
| 36 | + def set_runtime_library_dirs(self, dirs: list[str]) -> None: ... |
| 37 | + def define_macro(self, name: str, value: str | None = ...) -> None: ... |
| 38 | + def undefine_macro(self, name: str) -> None: ... |
| 39 | + def add_link_object(self, object: str) -> None: ... |
| 40 | + def set_link_objects(self, objects: list[str]) -> None: ... |
| 41 | + def detect_language(self, sources: str | list[str]) -> str | None: ... |
| 42 | + def find_library_file(self, dirs: list[str], lib: str, debug: bool = ...) -> str | None: ... |
| 43 | + def has_function( |
| 44 | + self, |
| 45 | + funcname: str, |
| 46 | + includes: list[str] | None = ..., |
| 47 | + include_dirs: list[str] | None = ..., |
| 48 | + libraries: list[str] | None = ..., |
| 49 | + library_dirs: list[str] | None = ..., |
| 50 | + ) -> bool: ... |
| 51 | + def library_dir_option(self, dir: str) -> str: ... |
| 52 | + def library_option(self, lib: str) -> str: ... |
| 53 | + def runtime_library_dir_option(self, dir: str) -> str: ... |
| 54 | + def set_executables(self, **args: str) -> None: ... |
| 55 | + def compile( |
| 56 | + self, |
| 57 | + sources: list[str], |
| 58 | + output_dir: str | None = ..., |
| 59 | + macros: _Macro | None = ..., |
| 60 | + include_dirs: list[str] | None = ..., |
| 61 | + debug: bool = ..., |
| 62 | + extra_preargs: list[str] | None = ..., |
| 63 | + extra_postargs: list[str] | None = ..., |
| 64 | + depends: list[str] | None = ..., |
| 65 | + ) -> list[str]: ... |
| 66 | + def create_static_lib( |
| 67 | + self, |
| 68 | + objects: list[str], |
| 69 | + output_libname: str, |
| 70 | + output_dir: str | None = ..., |
| 71 | + debug: bool = ..., |
| 72 | + target_lang: str | None = ..., |
| 73 | + ) -> None: ... |
| 74 | + def link( |
| 75 | + self, |
| 76 | + target_desc: str, |
| 77 | + objects: list[str], |
| 78 | + output_filename: str, |
| 79 | + output_dir: str | None = ..., |
| 80 | + libraries: list[str] | None = ..., |
| 81 | + library_dirs: list[str] | None = ..., |
| 82 | + runtime_library_dirs: list[str] | None = ..., |
| 83 | + export_symbols: list[str] | None = ..., |
| 84 | + debug: bool = ..., |
| 85 | + extra_preargs: list[str] | None = ..., |
| 86 | + extra_postargs: list[str] | None = ..., |
| 87 | + build_temp: str | None = ..., |
| 88 | + target_lang: str | None = ..., |
| 89 | + ) -> None: ... |
| 90 | + def link_executable( |
| 91 | + self, |
| 92 | + objects: list[str], |
| 93 | + output_progname: str, |
| 94 | + output_dir: str | None = ..., |
| 95 | + libraries: list[str] | None = ..., |
| 96 | + library_dirs: list[str] | None = ..., |
| 97 | + runtime_library_dirs: list[str] | None = ..., |
| 98 | + debug: bool = ..., |
| 99 | + extra_preargs: list[str] | None = ..., |
| 100 | + extra_postargs: list[str] | None = ..., |
| 101 | + target_lang: str | None = ..., |
| 102 | + ) -> None: ... |
| 103 | + def link_shared_lib( |
| 104 | + self, |
| 105 | + objects: list[str], |
| 106 | + output_libname: str, |
| 107 | + output_dir: str | None = ..., |
| 108 | + libraries: list[str] | None = ..., |
| 109 | + library_dirs: list[str] | None = ..., |
| 110 | + runtime_library_dirs: list[str] | None = ..., |
| 111 | + export_symbols: list[str] | None = ..., |
| 112 | + debug: bool = ..., |
| 113 | + extra_preargs: list[str] | None = ..., |
| 114 | + extra_postargs: list[str] | None = ..., |
| 115 | + build_temp: str | None = ..., |
| 116 | + target_lang: str | None = ..., |
| 117 | + ) -> None: ... |
| 118 | + def link_shared_object( |
| 119 | + self, |
| 120 | + objects: list[str], |
| 121 | + output_filename: str, |
| 122 | + output_dir: str | None = ..., |
| 123 | + libraries: list[str] | None = ..., |
| 124 | + library_dirs: list[str] | None = ..., |
| 125 | + runtime_library_dirs: list[str] | None = ..., |
| 126 | + export_symbols: list[str] | None = ..., |
| 127 | + debug: bool = ..., |
| 128 | + extra_preargs: list[str] | None = ..., |
| 129 | + extra_postargs: list[str] | None = ..., |
| 130 | + build_temp: str | None = ..., |
| 131 | + target_lang: str | None = ..., |
| 132 | + ) -> None: ... |
| 133 | + def preprocess( |
| 134 | + self, |
| 135 | + source: str, |
| 136 | + output_file: str | None = ..., |
| 137 | + macros: list[_Macro] | None = ..., |
| 138 | + include_dirs: list[str] | None = ..., |
| 139 | + extra_preargs: list[str] | None = ..., |
| 140 | + extra_postargs: list[str] | None = ..., |
| 141 | + ) -> None: ... |
| 142 | + def executable_filename(self, basename: str, strip_dir: int = ..., output_dir: str = ...) -> str: ... |
| 143 | + def library_filename(self, libname: str, lib_type: str = ..., strip_dir: int = ..., output_dir: str = ...) -> str: ... |
| 144 | + def object_filenames(self, source_filenames: list[str], strip_dir: int = ..., output_dir: str = ...) -> list[str]: ... |
| 145 | + def shared_object_filename(self, basename: str, strip_dir: int = ..., output_dir: str = ...) -> str: ... |
| 146 | + def execute(self, func: Callable[..., object], args: tuple[Any, ...], msg: str | None = ..., level: int = ...) -> None: ... |
| 147 | + def spawn(self, cmd: list[str]) -> None: ... |
| 148 | + def mkpath(self, name: str, mode: int = ...) -> None: ... |
| 149 | + def move_file(self, src: str, dst: str) -> str: ... |
| 150 | + def announce(self, msg: str, level: int = ...) -> None: ... |
| 151 | + def warn(self, msg: str) -> None: ... |
| 152 | + def debug_print(self, msg: str) -> None: ... |
0 commit comments