[Pyrex] bug in distutils, or a python bug?

Charles Moad cmoad at indiana.edu
Tue Feb 22 13:26:47 CET 2005


distutils was modified in 2.4.  This patch was posted on the list a 
while back.

--- build_ext.py        Fri Apr 30 08:00:46 2004
+++ new-build_ext.py    Wed Dec 29 03:11:19 2004
@@ -32,7 +32,7 @@
        if self.compiler == 'mingw32':
          self.swig_cpp = 1

-  def swig_sources (self, sources):
+  def swig_sources (self, sources, extension=None):
      if not self.extensions:
        return


- Charlie

Simon Wittber wrote:
> I've just installed the free MS compiler using the instructions at:
> vrplumber.com/programming/mstoolkit/
> 
> I've also installed:
> http://www.prescod.net/pyximport/
> 
> Now for the weird error:
>   File "c:\python\24\lib\distutils\command\build_ext.py", line 443, in
> build_extension
>     sources = self.swig_sources(sources, ext)
> TypeError: swig_sources() takes exactly 2 arguments (3 given)
> 
> If you look closely at the above error, you will notice it is a method
> call, and therefore, the self argument is passed implicitly.
> 
> The method signature contains 3 arguments, and looks like:
> def swig_sources (self, sources, extension)
> 
> Any idea why this error is occuring? At forst glance, it looks like a
> rather nasty python2.4 bug!
> 
> Sw.
> 
> _______________________________________________
> Pyrex mailing list
> Pyrex at lists.copyleft.no
> http://lists.copyleft.no/mailman/listinfo/pyrex
> 
> 



More information about the Pyrex mailing list