How to use .pxd files in cython

Hi all,
I want to use a separate module for these type of declarations.

cdef:
    UINT WM_CREATE = 1
    UINT WM_DESTROY = 2

I put this in a constants.pxd file and cimport it like this.
cimport constants as con
But it didn’t worked. This is the error message;
ModuleNotFoundError: No module named 'constants'

It worked with this workaround.

cdef extern from "windows.h":
    cdef UINT WM_CREATE = 1
    cdef UINT WM_DESTROY = 2

I don’t know if this will be duplicate declaration since windows.h has all these constants declared.