[Pyrex] array setting and math function annoyance

Stefan Behnel stefan_ml at behnel.de
Fri Mar 14 17:17:51 CET 2008


Hi,

Arc Riley wrote:
> We'd be using Cython if it were not for a few pesky bugs we've yet to work
> around, namely our source is arranged in a manner which Cython cannot
> handle;
> 
> src/<extension>/soy.<extension>.pyx which includes
> src/<extension>/<EachClass>.pxi
> 
> The resulting compile, as you could likely guess, raises errors such as:
>   AttributeError: 'src.colors.soy.colors.Color' object has no attribute '_a'

One thing I noticed from your setup.py is that you forgot to add this option:

    package_dir = {'': 'src'},

to tell distutils that the 'src' package contains the main package tree.
Otherwise, how is it supposed to know that "src" is not meaningful?

You can look at this file to get some ideas:

http://codespeak.net/svn/lxml/trunk/setupinfo.py

The setup.py that calls it is here:

http://codespeak.net/svn/lxml/trunk/setup.py

Stefan




More information about the Pyrex mailing list