From ba9eb1866d582051705b225b25b8e150a7ee334f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl> Date: Sun, 28 Mar 2021 20:21:39 +0200 Subject: [PATCH] fix docs --- docs/usage.rst | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/docs/usage.rst b/docs/usage.rst index 43bb111..7ca3607 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -5,19 +5,32 @@ To use snakehouse just use the following in your :code:`setup.py`: .. code-block:: python - list_of_pyx_files = [ ... ] + from snakehouse import Multibuild, build + + extensions = build([ + Multibuild('example_module', list_of_pyx_files) + ], compiler_directives={ + 'language_level': '3', + }) setup(name='example_module', version='0.1', packages=['example_module'], - ext_modules=Multibuild('example_module', list_of_pyx_files) + ext_modules=extensions ) -Full documentation of Multibuild is here +You can pass also :code:`setuptools`'s :code:`Extensions` objects, as detailed in +example_. + +.. _example: https://github.com/smok-serwis/snakehouse/blob/develop/example/setup.py + +Full pydoc of :code:`Multibuild` and :code:`build` is here .. autoclass:: snakehouse.Multibuild :members: +.. autofunction:: snakehouse.build + You should use :code:`dont_snakehouse` for debugging and unit tests, as snakehouse has a sad tendency to dump core on unhandled exceptions. To prevent that from happening remember to handle your exceptions and debug using this flag. -- GitLab