parent
a2fc2e2165
commit
0cb05004ca
4 changed files with 65 additions and 10 deletions
@ -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, |
||||
) |
||||
``` |
@ -0,0 +1,18 @@ |
||||
## Cython as as first class language |
||||
|
||||
Meson now supports Cython as a first class language. This means you can write: |
||||
|
||||
```meson |
||||
project('my project', 'cython') |
||||
|
||||
py = import('python') |
||||
dep_py3 = py.dependency() |
||||
|
||||
py.extension_module( |
||||
'foo', |
||||
'foo.pyx', |
||||
dependencies : dep_py, |
||||
) |
||||
``` |
||||
|
||||
And avoid the step through a generator that was previously required. |
Loading…
Reference in new issue