On Mon, Apr 11, 2016 at 11:50 AM Ian Henriksen < insertinterestingnameh...@gmail.com> wrote:
> To answer the original question about define macros, it appears that the > canonical > way to pass preprocessor defines through distutils is to use the > define_macros > keyword when constructing your Extension class. You should also be able to > do > this within a Cython source file by including a directive like: > > # distutils: define_macros = MY_DEFINE, MY_DEFINE_2=2 > > Unfortunately, it looks like there's a bug in that that's making it so > that these > macros are undef'ed rather than being defined, so, for now, just pass the > appropriate flags to your Extension object. > > Small update on this, it looks like the issue with undef/define only applies when a define is specified this way without a value, so I either haven't gotten the syntax quite right, or that's not supported yet. Specifying an actual value for the macro works fine. Best, Ian Henriksen
_______________________________________________ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel