[Pyrex] Help for public Python extension types.

Daehyok Shin sdhyok at gmail.com
Sat Jun 28 06:50:22 CEST 2008


Thanks for your reply, Greg.
To resolve the problem, do you mean I have to change the file names
from test.pyx to xxx.yyy.zzz.test.pyx and from test.pxd to
xxx.yyy.zzz.test.pxd?

Daehyok

On Fri, Jun 27, 2008 at 9:11 PM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> 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