Index: setuptools/command/build_ext.py =================================================================== --- setuptools/command/build_ext.py (revision 58493) +++ setuptools/command/build_ext.py (working copy) @@ -74,7 +74,8 @@ # Workaround for problems using some Pyrex versions w/SWIG and/or 2.4 def swig_sources(self, sources, *otherargs): # first do any Pyrex processing - sources = _build_ext.swig_sources(self, sources) or sources + if hasattr(_build_ext, 'pyrex_sources'): + sources = _build_ext.pyrex_sources(self, sources, *otherargs) # Then do any actual SWIG stuff on the remainder return _du_build_ext.swig_sources(self, sources, *otherargs)