I have a problem using the example from
http://docs.cython.org/docs/sharing_declarations.html#sharing-extension-types
I'm compiling it with the setup.py file from below, with the command
python setup.py build_ext --inplace
When I run it I get the following error:
$ python -c 'import Landscaping'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "Landscaping.pyx", line 6, in Landscaping (Landscaping.c:347)
print "Shrubbery size is %d x %d" % (sh.width, sh.height)
AttributeError: 'Shrubbing.Shrubbery' object has no attribute 'height'
It looks like the Shrubbing.pxd file, where the hight and width attributes are
defined, is ignored. How can I fix this?
--
-- Ewald
------------------------------------------------------------------
# setup.py
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
setup(
cmdclass = {'build_ext': build_ext},
ext_modules = [
Extension("Shrubbing", ["Shrubbing.pyx"]),
Extension("Landscaping", ["Landscaping.pyx"])]
)
------------------------------------------------------------------
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev