[Pyrex] [newbie] first error : "init function"

Greg Ewing greg at cosc.canterbury.ac.nz
Mon Sep 22 04:34:52 CEST 2003


> setup(
>   name = "py_pro_auget",
>   ext_modules=[
>     Extension("py_date", ["pro_auget.pyx", "date.c"])

The name of the extension module must match the name of the
.pyx file that it's compiled from. That's because Pyrex uses
the .pyx file name to derive the name of the init function
that gets compiled into the module.

Rename your .pyx file to "py_date.pyx", update the setup
file accordingly, and all should be well.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+




More information about the Pyrex mailing list