On Jun 5, 2009, at 10:49 PM, Sébastien Barthélemy wrote:

> 2009/6/5 Robert Bradshaw <[email protected]>:
>> On Jun 5, 2009, at 8:46 AM, Sébastien Barthélemy wrote:
>>> I have a project involving cython files with the following file
>>> hierarchy.
>>>
>>> /setup.py
>>> /src/homogeneousmatrix.pyx
>>> /src/homogeneousmatrix.pxd
>>> /src/__init__.py
>>> /src/...
>
> [...]
>
>> If you don't want to specify ext_package, you should probably lay out
>> your sources as you would for normal .py files, e.g. put everything
>> in the arboris package in an "arboris" directory rather than a "src"
>> directory.
>
> I think my sources are currently laid out as for normal python source.
> (while I agree renaming src into arboris would be nice.)

Normally A/B/C.py corresponds to the module A.B.C. Is there any  
reason you can't rename src to arboris?

> By the way, if I use
>
> dir = {'arboris':'src'},
>    ext_modules = [Extension("arboris.homogeneousmatrix",
>                             ["src/homogeneousmatrix.pyx"])]
>
> (that is without ext_package), cython -- as called by distutils --
> does not use/find the pxd. But if I run cython directly from the
> command line (cython src/homogeneousmatrix.pyx) it does. This
> discrepancy sounds like a bug to me.

That is because it's actually creating a module  
"src.homogeneousmatrix" and it finds "homogeneousmatrix.pxd" just  
fine. Running Cython directly doesn't read setup.py at all.

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

Reply via email to