MCPcopy Index your code
hub / github.com/python/mypy / build_single_module

Function build_single_module

mypyc/build.py:405–422  ·  view source on GitHub ↗

Produce the list of extension modules for a standalone extension. This contains just one module, since there is no need for a shared module.

(
    sources: list[BuildSource],
    cfiles: list[str],
    extra_compile_args: list[str],
    extra_include_dirs: list[str],
)

Source from the content-addressed store, hash-verified

403
404
405def build_single_module(
406 sources: list[BuildSource],
407 cfiles: list[str],
408 extra_compile_args: list[str],
409 extra_include_dirs: list[str],
410) -> list[Extension]:
411 """Produce the list of extension modules for a standalone extension.
412
413 This contains just one module, since there is no need for a shared module.
414 """
415 return [
416 get_extension()(
417 sources[0].module,
418 sources=cfiles,
419 include_dirs=[include_dir()] + extra_include_dirs,
420 extra_compile_args=extra_compile_args,
421 )
422 ]
423
424
425def write_file(path: str, contents: str) -> None:

Callers 1

mypycifyFunction · 0.85

Calls 2

get_extensionFunction · 0.85
include_dirFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…