Skip to content

Commit

Permalink
Add docstring to compile_module
Browse files Browse the repository at this point in the history
  • Loading branch information
funkey committed Mar 12, 2024
1 parent d721f8c commit efe7c8f
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions src/witty/compile_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,48 @@ def compile_module(
force_rebuild=False,
quiet=False,
):
"""Compile a Cython module given as a PYX source string.
The module will be stored in Cython's cache directory. Called with the same
``source_pyx``, the cached module will be returned.
Args:
source_pyx (``str``):
The PYX source code.
source_files (list of ``Path``s, optional):
Additional source files the PYX code depends on. Changes to those
files will trigger re-compilation of the module.
include_dirs (list of ``Path``s, optional):
library_dirs (list of ``Path``s, optional):
language (``str``, optional):
extra_compile_args (list of ``str``, optional):
extra_link_args (list of ``str``, optional):
Arguments to forward to the Cython extension.
name (``str``, optional):
The base-name of the module file. Defaults to ``_witty_module``.
force_rebuild (``bool``, optional):
Force a rebuild even if a module with that name/hash already
exists.
quiet (``bool``, optional):
Supress output except errors and warnings.
Returns:
The compiled module.
"""

if source_files is None:
source_files = []
if include_dirs is None:
Expand Down

0 comments on commit efe7c8f

Please sign in to comment.