[Pyrex] using .pxds from inside packages

Greg Ewing greg at cosc.canterbury.ac.nz
Wed Jul 14 03:29:46 CEST 2004


> 1. extend cimport so you can do e.g.
> 
>    from package cimport pyxmodule
> 
> and it will look for package/pyxmodule.pxd

There's a not-yet-documented feature which may help.
You can do

  cimport package.pyxmodule

and it will look for a file called "package.pyxmodule.pxd".
The file doesn't have to be in any particular directory
as long as it's somewhere on the include path.

> 2. Distutils improvement so it is possible to pass include dirs.

Yes, that would be useful as well. I'll keep it in mind
for a future version, although hacking distutils internals is
not something I'm particulary expert at.

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