better conversion from C defines to cython/python globals