<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2657.73">
<TITLE>RE: [Pyrex] Newbie qustion</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>Vanitha,</FONT>
</P>

<P><FONT SIZE=2>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:</FONT></P>

<P><FONT SIZE=2>### distutils/command/build_ext.py ###</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp; def build_extensions(self):</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # First, sanity-check the 'extensions' list</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.check_extensions_list(self.extensions)</FONT>
</P>

<P><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for ext in self.extensions:</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.build_extension(ext)&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # &lt;-- this is where your stack trace terminates</FONT>
</P>

<P><FONT SIZE=2>Are you able to repost your error and also some information about your build environment?</FONT>
</P>

<P><FONT SIZE=2>Regards,</FONT>
</P>

<P><FONT SIZE=2>Grant M.</FONT>
</P>

<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: pyrex-bounces@lists.copyleft.no</FONT>
<BR><FONT SIZE=2>[<A HREF="mailto:pyrex-bounces@lists.copyleft.no">mailto:pyrex-bounces@lists.copyleft.no</A>]On Behalf Of vanitha@cs.wisc.edu</FONT>
<BR><FONT SIZE=2>Sent: 26 November 2005 00:34</FONT>
<BR><FONT SIZE=2>To: pyrex@lists.copyleft.no</FONT>
<BR><FONT SIZE=2>Subject: [Pyrex] Newbie qustion</FONT>
</P>
<BR>

<P><FONT SIZE=2>Hi All,</FONT>
<BR><FONT SIZE=2>I'm new to Pyrex and Python, so you'll have to pardon me if this is a</FONT>
<BR><FONT SIZE=2>silly question!</FONT>
</P>

<P><FONT SIZE=2>I ran a simple example to test Pyrex. I used the one given in</FONT>
<BR><FONT SIZE=2><A HREF="http://cfl-x.uwindsor.ca/graham/pyrex/" TARGET="_blank">http://cfl-x.uwindsor.ca/graham/pyrex/</A></FONT>
</P>

<P><FONT SIZE=2>I have a file foo.pyx that has the following code in it:</FONT>
<BR><FONT SIZE=2>&quot;&quot;&quot;A simple extension module example&quot;&quot;&quot;</FONT>
</P>

<P><FONT SIZE=2>cdef class Foo:</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>&quot;&quot;&quot;A foo, like any other.</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>Create one with Foo(s), where s is the name to assign to your foo.&quot;&quot;&quot;</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>cdef char *name</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>def __init__(self, name):</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>self.name = name</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>def __repr__(self):</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>return &quot;A Foo named %s.&quot; % (self.name)</FONT>
</P>

<P><FONT SIZE=2>I have a setup.py that has the following code in it:</FONT>
</P>

<P><FONT SIZE=2>from distutils.core import setup</FONT>
<BR><FONT SIZE=2>from distutils.extension import Extension</FONT>
<BR><FONT SIZE=2>from Pyrex.Distutils import build_ext</FONT>
</P>

<P><FONT SIZE=2>setup(name='foo', ext_modules=[Extension(&quot;foo&quot;, [&quot;foo.pyx&quot;])],</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>cmdclass = {'build_ext': build_ext}</FONT>
<BR><FONT SIZE=2>)</FONT>
</P>

<P><FONT SIZE=2>I run python setup.py build_ext --inplace</FONT>
<BR><FONT SIZE=2>and end up getting the following errors:</FONT>
</P>

<P><FONT SIZE=2>running build_ext</FONT>
<BR><FONT SIZE=2>building 'foo' extension</FONT>
<BR><FONT SIZE=2>Traceback (most recent call last):</FONT>
<BR><FONT SIZE=2>&nbsp; File &quot;setup.py&quot;, line 6, in ?</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp; cmdclass = {'build_ext' : build_ext}</FONT>
<BR><FONT SIZE=2>&nbsp; File &quot;/afs/cs.wisc.edu/u/v/a/vanitha/lib/python2.4/distutils/core.py&quot;,</FONT>
<BR><FONT SIZE=2>line 149, in setup</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp; dist.run_commands()</FONT>
<BR><FONT SIZE=2>&nbsp; File &quot;/afs/cs.wisc.edu/u/v/a/vanitha/lib/python2.4/distutils/dist.py&quot;,</FONT>
<BR><FONT SIZE=2>line 946, in run_commands</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp; self.run_command(cmd)</FONT>
<BR><FONT SIZE=2>&nbsp; File &quot;/afs/cs.wisc.edu/u/v/a/vanitha/lib/python2.4/distutils/dist.py&quot;,</FONT>
<BR><FONT SIZE=2>line 966, in run_command</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp; cmd_obj.run()</FONT>
<BR><FONT SIZE=2>&nbsp; File</FONT>
<BR><FONT SIZE=2>&quot;/afs/cs.wisc.edu/u/v/a/vanitha/lib/python2.4/distutils/command/build_ext.py&quot;,</FONT>
<BR><FONT SIZE=2>line 279, in run</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp; self.build_extensions()</FONT>
<BR><FONT SIZE=2>&nbsp; File</FONT>
<BR><FONT SIZE=2>&quot;/afs/cs.wisc.edu/u/v/a/vanitha/lib/python2.4/distutils/command/build_ext.py&quot;,</FONT>
<BR><FONT SIZE=2>line 405, in build_extensions</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp; self.build_extension(ext)</FONT>
<BR><FONT SIZE=2>&nbsp; File</FONT>
<BR><FONT SIZE=2>&quot;/afs/cs.wisc.edu/u/v/a/vanitha/lib/python2.4/distutils/command/build_ext</FONT>
</P>

<P><FONT SIZE=2>What am I missing here?</FONT>
</P>

<P><FONT SIZE=2>Thanks,</FONT>
</P>

<P><FONT SIZE=2>- Vanitha</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=2>_______________________________________________</FONT>
<BR><FONT SIZE=2>Pyrex mailing list</FONT>
<BR><FONT SIZE=2>Pyrex@lists.copyleft.no</FONT>
<BR><FONT SIZE=2><A HREF="http://lists.copyleft.no/mailman/listinfo/pyrex" TARGET="_blank">http://lists.copyleft.no/mailman/listinfo/pyrex</A></FONT>
</P>

</BODY>
<!--[object_id=#infocomp.com#]--><P><FONT face=Arial color=#808080 size=1>Important notice: This message is intended for the individual(s) and entity(s) addressed. The information contained in this transmission and any attached, may be confidential and may also be the subject of legal privilege, public interest immunity or legal professional privilege. Any review, retransmission, dissemination or other use of, taking of any action in reliance upon this information by person or entities other than the recipient is prohibited and requires authorization from the sender. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person) you may not copy or deliver this message to anyone. In such cases you should destroy this message and kindly notify the sender by reply email. </FONT></P>
<P><FONT face=Arial color=#808080 size=1>WARNING: Although Infocomp has taken reasonable precautions so that no viruses&nbsp;are present in this e-mail, the company cannot accept responsibility for any loss or damage arising from the use of e-mail attachments.</FONT></P></HTML>