cimport from different packages [Pyrex]

George Sakkis gsakkis at rutgers.edu
Mon May 9 17:13:17 EDT 2005


Does cimport work for importing from different packages in Pyrex ?
Here's a minimal example:

# in ./foo/bar.pxd
cdef class Bar:
    cdef int i

# in ./foo/bar.pyx
cdef class Bar:
    def __init__(self, i):
        self.i = i

# in ./tmp.pyx
cimport foo.bar

$ pyrexc foo/bar.pyx
$ pyrexc tmp.pyx
tmp.pyx:1:8: 'foo.bar.pxd' not found


I tried every reasonable choice for '-I' dir, without success. Am I
missing something or it's just cimport's deficiency ?

George




More information about the Python-list mailing list