[Cython] dynamically compile and import pure python modules

Stefan Behnel stefan_ml at behnel.de
Thu Mar 22 20:16:07 CET 2012

Dag Sverre Seljebotn, 22.03.2012 20:12:
> On 03/22/2012 11:50 AM, mark florisson wrote:
>> For the fused type runtime dispatch I found it very convenient to use
>> the with statement, but that is not supported in Python 2.4. However,
>> the compiler could dynamically compile compiler code with the compiler
>> itself and import it (pyximport), if it is not needed to compile
>> Cython itself. I gave it a try and it seems to work like a charm (but
>> probably needs more testing :):
>> https://github.com/markflorisson88/cython/commit/0c2983056919f7f4d30a809724d7db0ace99d89b#diff-2
>> It seems like a bit of a hack, so I thought I'd bring it up here and
>> ask for opinions, i.e. ask if anyone thinks it is a terrible idea.
> How about dropping Python 2.4 support for running Cython (though generated
> C files still run)?

For one, it would make it trickier to run the test suite.


More information about the cython-devel mailing list