Skip to content

How can I use Meson to create Cython libraries? #13082

Discussion options

You must be logged in to vote

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().

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by dreamer-coding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants