diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2020-04-14 09:10:52 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2020-04-14 09:10:52 +0200 |
commit | b03e157de151f35aaab3246c094685c192c7a278 (patch) | |
tree | f8bce8924c755b67f2f20ae5e356f11d6a920bdf | |
parent | 2fcfd544f25411f14ddd3387d81be04645c4a134 (diff) | |
download | cython-b03e157de151f35aaab3246c094685c192c7a278.tar.gz |
Add a stub documentation page about embedding Cython modules in C/C++ applications.
-rw-r--r-- | docs/src/tutorial/embedding.rst | 27 | ||||
-rw-r--r-- | docs/src/tutorial/index.rst | 2 |
2 files changed, 28 insertions, 1 deletions
diff --git a/docs/src/tutorial/embedding.rst b/docs/src/tutorial/embedding.rst new file mode 100644 index 000000000..e296f1296 --- /dev/null +++ b/docs/src/tutorial/embedding.rst @@ -0,0 +1,27 @@ +.. highlight:: cython + +.. _embedding: + +********************************************** +Embedding Cython modules in C/C++ applications +********************************************** + +This is a stub documentation page. PRs welcome. + +* `CPython docs <https://docs.python.org/3/extending/embedding.html>`_ + +* `Cython Wiki <https://github.com/cython/cython/wiki/EmbeddingCython>`_ + +* See the ``--embed`` option to the ``cython`` and ``cythonize`` frontends + for generating a C main function. + +* `Embedding demo program <https://github.com/cython/cython/tree/master/Demos/embed>`_ + +* The `PyImport_AppendInittab() <https://docs.python.org/3/c-api/import.html#c.PyImport_AppendInittab>`_ + function in CPython allows registering statically (or dynamically) linked extension modules + for later imports. + +* Also see the documentation of the + `module init function <https://docs.python.org/3/extending/extending.html#the-module-s-method-table-and-initialization-function>`_ + in CPython and `PEP 489 <https://www.python.org/dev/peps/pep-0489/>`_ regarding the module + initialisation mechanism in CPython 3.5 and later. diff --git a/docs/src/tutorial/index.rst b/docs/src/tutorial/index.rst index 14bc5d9ee..67ff4ff1c 100644 --- a/docs/src/tutorial/index.rst +++ b/docs/src/tutorial/index.rst @@ -13,10 +13,10 @@ Tutorials profiling_tutorial strings memory_allocation + embedding pure numpy array readings related_work appendix - |