[Pyrex] Newbie question

vanitha at cs.wisc.edu vanitha at cs.wisc.edu
Sat Nov 26 04:55:32 CET 2005


Hi Grant:
I'm using Pyrex 0.9.3 along with Python 2.4 and gcc on Linux.
I think I'll have to upgrade to 0.9.3.1 to get the distutils patch.
Here is the whole error message anyways!

python setup.py build_ext --inplace
> 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.py",
> line 442, in build_extension
>     sources = self.swig_sources(sources, ext)
> TypeError: swig_sources() takes exactly 2 arguments (3 given)

Thanks,

- Vanitha

Original Message:

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.





More information about the Pyrex mailing list