[Pyrex] Newbie qustion
Grant McDonald
gmcdonald at infocomp.com
Sat Nov 26 00:40:01 CET 2005
Vanitha,
What version of Pyrex are you using? I built the sample extension you
provided without encountering an error with Pyrex 0.9.3.1, Python 2.4.1 and
MSVC 7.0. The stack trace that you provided seems to be lacking the final
error message because the line it terminates on is:
### distutils/command/build_ext.py ###
def build_extensions(self):
# First, sanity-check the 'extensions' list
self.check_extensions_list(self.extensions)
for ext in self.extensions:
self.build_extension(ext) # <-- this is where your
stack trace terminates
Are you able to repost your error and also some information about your build
environment?
Regards,
Grant M.
-----Original Message-----
From: pyrex-bounces at lists.copyleft.no
[mailto:pyrex-bounces at lists.copyleft.no]On Behalf Of vanitha at cs.wisc.edu
Sent: 26 November 2005 00:34
To: pyrex at lists.copyleft.no
Subject: [Pyrex] Newbie qustion
Hi All,
I'm new to Pyrex and Python, so you'll have to pardon me if this is a
silly question!
I ran a simple example to test Pyrex. I used the one given in
http://cfl-x.uwindsor.ca/graham/pyrex/
I have a file foo.pyx that has the following code in it:
"""A simple extension module example"""
cdef class Foo:
"""A foo, like any other.
Create one with Foo(s), where s is the name to assign to your
foo."""
cdef char *name
def __init__(self, name):
self.name = name
def __repr__(self):
return "A Foo named %s." % (self.name)
I have a setup.py that has the following code in it:
from distutils.core import setup
from distutils.extension import Extension
from Pyrex.Distutils import build_ext
setup(name='foo', ext_modules=[Extension("foo", ["foo.pyx"])],
cmdclass = {'build_ext': build_ext}
)
I run python setup.py build_ext --inplace
and end up getting the following errors:
running build_ext
building 'foo' extension
Traceback (most recent call last):
File "setup.py", line 6, in ?
cmdclass = {'build_ext' : build_ext}
File "/afs/cs.wisc.edu/u/v/a/vanitha/lib/python2.4/distutils/core.py",
line 149, in setup
dist.run_commands()
File "/afs/cs.wisc.edu/u/v/a/vanitha/lib/python2.4/distutils/dist.py",
line 946, in run_commands
self.run_command(cmd)
File "/afs/cs.wisc.edu/u/v/a/vanitha/lib/python2.4/distutils/dist.py",
line 966, in run_command
cmd_obj.run()
File
"/afs/cs.wisc.edu/u/v/a/vanitha/lib/python2.4/distutils/command/build_ext.py
",
line 279, in run
self.build_extensions()
File
"/afs/cs.wisc.edu/u/v/a/vanitha/lib/python2.4/distutils/command/build_ext.py
",
line 405, in build_extensions
self.build_extension(ext)
File
"/afs/cs.wisc.edu/u/v/a/vanitha/lib/python2.4/distutils/command/build_ext
What am I missing here?
Thanks,
- Vanitha
_______________________________________________
Pyrex mailing list
Pyrex at lists.copyleft.no
http://lists.copyleft.no/mailman/listinfo/pyrex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.copyleft.no/pipermail/pyrex/attachments/20051126/553860e0/attachment.html
More information about the Pyrex
mailing list