views:

10

answers:

0

I try to conditionally compile (or generate) to c code from a Cython pxd. I read that I can DEF to define aa value and IF to conditionally generate based on its value, but how can I get this value to get from outside of the pxd file?

Specifically these two cases are interesting for me now:

  • give some command-line define to Cython, preferrably through the Cython.Distutils setuptools way
  • the extern-ed C header file defines some value, and conditionally define using Cython based on this value (maybe impossible now?)

Thank you