Magnus Lie Hetland wrote:
> On Sep 17, 2009, at 08:41, Stefan Behnel wrote:
> 
>> Robert Bradshaw wrote:
>>> On Sep 16, 2009, at 4:55 PM, Magnus Lie Hetland wrote:
>>>> 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.
> 
> 
> Hmm. OK. I still don't understand why the missing __init__.py file  
> means that the .pxd file is ignored...
> 
> At the moment, I'm trying to split my code into two separate dirs --  
> src/ and lib/ -- with src containing the Cython source (in pure Python  
> mode .py files, along with .pxd files, as needed) and lib containing  
> the Python code that is to be installed. However, it would seem I  
> can't compile the pure Python mode Cython files properly without  
> adding an unused __init__.py file to the source directory? Or am I  
> misunderstanding that part?

Note that Python doesn't allow this either -- you can't spread a Python 
package across several directories.

-- 
Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to