[SciPy-Dev] git-friendly cythonize script + Tempita templating
Dag Sverre Seljebotn
dagss at student.matnat.uio.no
Mon Jan 31 14:14:36 EST 2011
On 01/31/2011 07:52 PM, Pauli Virtanen wrote:
> Mon, 31 Jan 2011 15:48:54 +0100, Dag Sverre Seljebotn wrote:
> [clip]
>
>> Later (too late) I discovered that Mako was already in use in SciPy in
>> interpolate/interpnd.pyx. In the "cythonize" branch linked to above I've
>> converted it to use Tempita instead, in case you agree with that. The
>> advantage with Tempita is that it fits in a single ~1000-line Python
>> file, so that it should be convenient to bundle it with the build system
>> on a later date.
>>
> I don't have strong feelings for one way or another. Since the templates
> should be used only for simple stuff, whatever is used probably doesn't
> matter too much. (Using them for more complicated stuff would be like
> "Hi, I put code generation in your code generation" ;).
>
:-)
Well, ideally Cython should cope with most of your code generation
needs, but in practice its preprocessing/macro capabilities can be too
limited sometimes. Hopefully we can meet in Munich and talk more about
this...
Dag Sverre
More information about the SciPy-Dev
mailing list