Cython, producing different modules from the same .pyx

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Dec 20 00:58:55 EST 2019


On 20/12/19 2:16 am, Lele Gaifax wrote:
> My first approach has been duplicating the Extension() entry in the
> setup.py(*), changing the first argument (that is, the name of the module).
> Although that did produce the alternative binary module, it could not be
> loaded because it contains the wrong PyInit_XXX(), where XXX is computed from
> the .pyx name,

You could try creating a set of top-level .pyx stubs, each of
which just 'include' the real code.

-- 
Greg


More information about the Python-list mailing list