How can I use Meson to create Cython libraries? #13082
-
How can I use Meson to create Cython libraries? Can this work with C and or C++? Is the Cython support only intended for libraries or can applications be built with Cython and Meson build? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You need to add the |
Beta Was this translation helpful? Give feedback.
-
Meson doesn't care how you use cython, it just provides a wrapper UX for listing cython sources and transpiling them to C or C++. Cython itself supports embedding into a C/C++ program via the aptly named |
Beta Was this translation helpful? Give feedback.
Meson doesn't care how you use cython, it just provides a wrapper UX for listing cython sources and transpiling them to C or C++.
Cython itself supports embedding into a C/C++ program via the aptly named
cython --embed
which generates a main() function for you. Or you can write your own main() and simply link to the cython files. Either way it's still as simple as adding .pyx files as source files to your executable().