[Pyrex] C-API implementation in Pyrex 0.9.6
Robert Bradshaw
robertwb at math.washington.edu
Sat Oct 20 20:28:04 CEST 2007
On Oct 20, 2007, at 6:45 AM, Stefan Behnel wrote:
>
> Greg Ewing wrote:
>> What about imports from modules which aren't in the package?
>> The only way to fix this by style enforcement would be to
>> ban local cimports altogether and require all cimports to
>> be absolute.
>
> Ok, so what would be the right fix then? If we want to support a
> global
> standard cimport directory for .pxd files, I would prefer splitting
> it up into
> package subdirectories rather than filling it up with
> "package.package.module.pxd" files. So that would mean Pyrex should
> look up
> cimported .pxd files in a well defined search path.
>
> If the .pxd is found in the current package directory, we know it's a
> package-local import and can determine the full module name at
> compile time
> (as we know the full name of the current module). Otherwise, we can
> search the
> import path for the module name appended to the local package and
> if that is
> not found either, search for the module name on its own. That way,
> we'd always
> know at compile time what the full package name is.
>
> Would that match your idea about package handling?
This sounds like a good idea to me.
- Robert
More information about the Pyrex
mailing list