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