[Pyrex] New Distutils implementation for Pyrex.
Robert Bradshaw
robertwb at math.washington.edu
Sat Aug 11 23:10:17 CEST 2007
On Aug 10, 2007, at 6:25 PM, Greg Ewing wrote:
> Stefan Behnel wrote:
>> 3) you want to generate c++ code and do not use any additional C++
>> source
>> files in the extension. Then you have to pass some option to Pyrex/
>> Cython to
>> make it generate C++ code. I don't see why you can't just stick to
>> the
>> language option in this case
>
> If you're talking about putting a different value
> in the language option to distinquish between
> an instruction to Pyrex and an instruction about
> the rest of the .c files, what happens if you want
> to use both at the same time?
>
> It seems simpler to me to use a separate option,
> because the two things are really orthogonal.
I wouldn't call the options orthogonal; they seem highly correlated
to me. From what I understand, Pyrex doesn't do anything special to
generate c vs. c++ code, other than put the appropriate extension on
(and that is solely so it gets compiled correctly. (Of course, the
pyrex file itself may have c++ specific code in it.) I have trouble
coming up with any scenario that you would want to tell Pyrex that
it's c++ code, yet use the c compiler, or vica-versa. In fact, if
Pyrex cares about what language to output, it makes total sense to me
for it to look at what setup.py is expecting (and which compiler will
be used on its output).
- Robert
More information about the Pyrex
mailing list