aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/Cython.md
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2021-06-07 23:29:30 +0300
committerGitHub <noreply@github.com>2021-06-07 23:29:30 +0300
commit40e8a67a837c4184ef02fa90eae05ef39f4b2199 (patch)
tree1d408f46ab94e1b24cecc1b86f2513ccaa5e7da9 /docs/markdown/Cython.md
parentd53ea7da2d3f40ca2ddcce229c4db28b904832fe (diff)
parent0bc18f26a21ea0c1ad06e131e872cec2cc6022a4 (diff)
downloadmeson-40e8a67a837c4184ef02fa90eae05ef39f4b2199.zip
meson-40e8a67a837c4184ef02fa90eae05ef39f4b2199.tar.gz
meson-40e8a67a837c4184ef02fa90eae05ef39f4b2199.tar.bz2
Merge pull request #8706 from dcbaker/wip/2021-04/cython-language
1st class Cython language support
Diffstat (limited to 'docs/markdown/Cython.md')
-rw-r--r--docs/markdown/Cython.md33
1 files changed, 33 insertions, 0 deletions
diff --git a/docs/markdown/Cython.md b/docs/markdown/Cython.md
new file mode 100644
index 0000000..17302b3
--- /dev/null
+++ b/docs/markdown/Cython.md
@@ -0,0 +1,33 @@
+---
+title: Cython
+short-description: Support for Cython in Meson
+...
+
+# Cython
+
+Meson provides native support for cython programs starting with version 0.59.0.
+This means that you can include it as a normal language, and create targets like
+any other supported language:
+
+```meson
+lib = static_library(
+ 'foo',
+ 'foo.pyx',
+)
+```
+
+Generally Cython is most useful when combined with the python module's
+extension_module method:
+
+```meson
+project('my project', 'cython')
+
+py = import('python')
+dep_py3 = py.dependency()
+
+py.extension_module(
+ 'foo',
+ 'foo.pyx',
+ dependencies : dep_py,
+)
+```