I'm using Cython to wrap a C library. The C library's header file defines a number of constants, so in my cython module, I have something like:
cdef extern from "lib.h":
cdef int CONST_A = 0
cdef int CONST_B = 1
When I compile the extension, the constants are not available in Python. I tried doing something like this, but it did not seem to work:
cdef extern from "lib.h":
cdef int CONST_A = 0
cdef int CONST_B = 1
CONST_A = CONST_A
CONST_B = CONST_B
Any ideas on how to make these constants available in Python?