From 698bad5e090a0bdbcaa5a5f352fd7774c9dfc436 Mon Sep 17 00:00:00 2001 From: Matt Einhorn Date: Wed, 5 Oct 2022 03:51:48 -0400 Subject: [PATCH] Include docstrings in cython code. Fixes API docs. (#76) --- setup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup.py b/setup.py index 076c6ea..967ce43 100755 --- a/setup.py +++ b/setup.py @@ -32,6 +32,10 @@ *(glob.glob(os.path.join(MARISA_SOURCE_DIR, path)) for path in MARISA_FILES) ) +COMPILER_DIRECTIVES = { + 'embedsignature': True, +} + DESCRIPTION = __doc__ # TODO: Switch back to builtin `open(FILE, encoding="utf-8")` when dropping Python 2.7 support with open("README.rst", encoding="utf-8") as f1, open( @@ -98,6 +102,7 @@ "src/trie.cpp", ], include_dirs=[MARISA_INCLUDE_DIR], + compiler_directives=COMPILER_DIRECTIVES, ) ], python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",