Short version:
How to import .def
files in Cython?
Long version:
I am writing a Cython wrapper for VLFeat library. So there are two parts a def of a Cython module a definition file with a .pxd suffix, containing C declarations that are to be available to other Cython modules, and an implementation file with a .pyx suffix, containing everything else.
The structure is quite simple.
There's a .h
, a MEX (provides an interface between MATLAB or Octave and functions written in C) and a C (contains actual algorithm implementation) file for a particular function in Vlfeat library.
.h
translates to -> .pxd
CMEX translates to -> .pyx
There wasn't any deviations from the structure until now.
There's a function vl_binsum for which there is a MEX file and a .def file. I am not sure how to declare the contents of the .def
file in a .pxd
. Or does it even require a declaration? I tried searching a lot but couldn't find any tangible solution.