Hi,

Stephane DROUARD wrote:
> 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.

If you build your modules with distutils, Cython will pick up the correct
package name from what you provide in your Extension setup. This allows you to
keep your sources in one place and build them into packaged modules purely for
shipping.


>>> 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.

Then you're lucky that you are not using doctests, as your users would not be
able to run the test suite if they encounter any problems.


>> 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.

That does not answer my question about a use case. You mentioned different
things so far, one being source code layout versus shipping in packages, one
being users moving modules around as they see fit. I understand that some
people require the first for legacy reasons ("we always kept our sources in
that one directory!"). I don't see a reason for the latter.

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

Reply via email to