Stefan Behnel wrote:

> Stephane DROUARD wrote:
>> Today our source code database structure does not care at all of the 
>> final package structure. So the fact that PXD files need to be located 
>> withing the same directory structure as the PYD/SO files clearly is an
issue for us.
>
> That is clearly an unusual requirement. I had never heard of anyone who
doesn't keep
> Python modules in their package.

This structure does not cause any issues for pure Python modules as well as
SWIG'ed modules.
And honestly, I don't see why the source code "storage" would have to follow
the delivery structure. I understand that people may have this guideline,
but it's not mandatory.

>> So I'm "pushing" to get this behaviour, considering that PXD files 
>> have to be found at Cython'ization stage (through -I options), while 
>> SO/PYD files at execution stage (Python stuff). No need for a strong 
>> relationship between them.
>
> Well, yes, there is a relationship, even in Python. For example, your
exception doctests
> will break if you import the tested module from a different package.

I don't use doctest. But I assume we can test a module from a location and
use this same module (without testing it) in another location.
This is our testing strategy.

>> Now if you tell me that it is an intented behaviour, and you don't 
>> plan to modify it (or support both?), I will stop ennoying you with my
requests.
>
> Did you actually describe your use case anywhere? I don't see why users
should be
> allowed to move modules all over the place. That would result in import
code that will
> fail miserably when moved to other systems. Why do you use packages in the
first place,
> if your users don't care about them anyway?

The patches/ideas I've proposed just (try to) get Cython modules behave like
Python ones.
The intra-package reference is a behaviour that is clearly described in
Python. Cython does not behave like that.

Stephane

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

Reply via email to