> I think this is a result of a recent change to Pyrex that
> has been merged into Cython.

What is the last version of Cython that doesn't have this problem?  I
need to move quickly on a project and if I can't figure out a way of
handling these things in cython-devel, I will need to move back to a
stable release that is OK.

> If you do intend it to reside in a package, then there
> are two alternatives:

I do have this intention, but...

> 1) cd to the directory containing foo and compile
>    from there:
>
>      cd ..; cython foo/shrubbing.pyx

This does not work though.  I have to do:

cd ..
cython -I . foo/shrubbing.pyx


> 2) arrange for the directory containing foo to be
>    passed as a -I option, e.g.
>
>      cython -I .. shrubbing.pyx

This does work

> Arguably this behaviour is not very desirable, and I'll
> see if I can do something about it.

I understand the spirit of this.  We have a complex project with
multiple subprojects and this would allow us to run cython from the
top level dir by just including -I .  I will give this a try and see
if this will work for my scenario.  Previously, I was having to cd to
the dir with the pyx file and this could be an improvement.  But,
maybe the following algorithm would make sense:

1.  First check for the pxd file in the same dir as the pyx file.  If
found use it and create the .c file in that dir.

2.  If the pxd is not found there, then start to use this other logic.
 But, in this case, it would be nice if . was always on the include
path.

In either case, the behavior needs to be documented better.

Thanks for the help.

Brian


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

Reply via email to