[Pyrex] Help for public Python extension types.

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Jun 28 03:11:16 CEST 2008


Daehyok Shin wrote:

> I found the cause of the problem is the new syntax required for
> extension types under a package directory. The files work well even
> without the cimport statement if I test the files in a non-package
> directory. But, once I put the files under a package, the pyx file
> could not find its corresponding pxd file.

I tried your example with Pyrex 0.9.8.4, with and
without an __init__.py file in the directory, and
cd'ed to various places, but I couldn't get it to
fail.

Can you send me a complete example that demonstrates
the problem? Preferably in the form of a zip file
that reproduces the directory hierarchy, file names
and any __init__.py or __init__.pyx files that are
present. Also tell me where you are cd'ed to when
running the Pyrex compiler.

> If the class A is supposed to be imported as xxx.yyy.zzz.test.A,
> how should I change the source code in the files?

You shouldn't have to change anything in the source
files. The new rules concerning package directories
only affect the naming of source files, not their
contents.

-- 
Greg



More information about the Pyrex mailing list