Robert Bradshaw wrote: > On Sep 16, 2009, at 4:55 PM, Magnus Lie Hetland wrote: >> Now, I'd put the code in a package -- except I'd left out the >> __init__.py for now (which I'd gotten some warnings about, but I >> wasn't planning on doing any importing yet, so I thought it wouldn't >> matter; I was using a glob in my setup.py and didn't want to compile >> the init file). But as the module name was of the form foo.foo, I >> suspected this might be the problem ... and indeed it was. >> >> So, I guess, if I'd done it "by the book", and included the >> __init__.py file, it would have worked from the start. However I'd say >> the compile failed in a rather non-obvious way... (I.e., it actually >> did compile -- it just ignored the .pxd file...) > > Glad you were able to figure it out. I'm not sure how we should > detect this kind of error...
It's impossible to detect the case where an existing .pxd file is not found (since there might not actually be one), but we could detect the case where the module name does not reflect the package structure, i.e. exactly the case where the module code is expected to be inside of a package, but does not lie next to an __init__.py file. Stefan _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
