Skip to content

relationship between C/C++ Extension and cython #4028

Answered by abravalheri
ardeal asked this question in Q&A
Discussion options

You must be logged in to vote

Setuptools natively supports .c files in Extensions. That is a built-in capability.
You don't use cythonize with C extensions.

You just use cythonize when you have .pyx files1, because it converts .pyx files into .c (have a look on the Cython docs for more details).

Footnotes

  1. kind of... if you use the Extension class properly, you might not need to use cythonize at all because setuptools will try to call itself cythonize on the .pyx files. I recommend giving it a try and see if that works, if not you can revert to cythonize.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ardeal
Comment options

@abravalheri
Comment options

Answer selected by abravalheri
@ardeal
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants