[Cython] cimporting and packages (and renaming during compile)
Magnus Lie Hetland
magnus at hetland.org
Thu Jan 8 17:05:57 CET 2009
Hi!
Maybe I just haven't read the docs well enough... But I've got a few
modules with source names such as foo_core.pyx, foo_base.pyx and
foo_util.pyx. When I compile them, they end up in the foo package, as
foo.core, foo.base and foo.util. Works well for importing into Python,
but the problem is that the util module is primarily for use in the
other two Cython modules ... and I can't get the cimport to work.
I've added a foo_util.pxd (and there certainly may be errors in that),
but the main problem seems to be the naming -- there isn't a
correspondence (that Cython knows about) between the source file names
and the module names. Or perhaps that isn't a problem?
The error I keep getting is "Name 'some_function' not declared in
module 'foo.util'".
Any pointers?
--
Magnus Lie Hetland
http://hetland.org
More information about the Cython-dev
mailing list