Wrapping C++ code with Cython (using scikit-build)

70 views
Skip to first unread message

vybhav ramachandran

unread,
Nov 3, 2020, 3:54:46 AM11/3/20
to scikit-build
Hello!

I'm Vybhav and I'm trying to wrap C++ code/libraries with Python using Cython. The C++ code uses CMAKE as the build tool, so I landed on scikit-build that combines CMAKE with Setuptools.

In the examples, I see only an example where a Python module is "Cythonized". Can anyone point me to an example where a C++/C function is wrapped using scikit-build?

Thank you!


Jean-Christophe Fillion-Robin

unread,
Nov 3, 2020, 8:53:34 AM11/3/20
to vybhav ramachandran, scikit-build
Hi Vybhav,

Thanks for reaching out.

You could have a look at the following:


If you have a link to some code, we could make some recommendations.

Thanks
J-Christophe 


--
You received this message because you are subscribed to the Google Groups "scikit-build" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scikit-build...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scikit-build/d78834e3-0b12-44fa-b8a3-015d5516dd80n%40googlegroups.com.

vybhav ramachandran

unread,
Nov 3, 2020, 9:10:02 PM11/3/20
to scikit-build
Thanks Jean-Christophe! I'll check the links and revert.

Best,
Vybhav

vybhav ramachandran

unread,
Nov 11, 2020, 9:02:18 AM11/11/20
to scikit-build
Hi Jean, 

I tried following some examples, but I'm running into issues with cimport.

All the files (.pxd , .pyx and CMakeLists.txt) file are all in the same folder, but I get errors saying that it's unable to import the file.

Here's a gist with code from the  files and the error : https://gist.github.com/vybhavramachandran/0ae5cce45156e3f164e0eeae6cf690a0

What am I doing wrong?

Best,
Vybhav
Reply all
Reply to author
Forward
0 new messages