aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/build_ext.py
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/command/build_ext.py')
-rw-r--r--setuptools/command/build_ext.py49
1 files changed, 45 insertions, 4 deletions
diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py
index 4752a239..3678ac3e 100644
--- a/setuptools/command/build_ext.py
+++ b/setuptools/command/build_ext.py
@@ -1,11 +1,11 @@
-# Attempt to use Pyrex for building extensions, if available
-
+from distutils.command.build_ext import build_ext as _du_build_ext
try:
+ # Attempt to use Pyrex for building extensions, if available
from Pyrex.Distutils.build_ext import build_ext as _build_ext
except ImportError:
- from distutils.command.build_ext import build_ext as _build_ext
+ _build_ext = _du_build_ext
-import os
+import os, sys
from distutils.file_util import copy_file
class build_ext(_build_ext):
@@ -39,3 +39,44 @@ class build_ext(_build_ext):
dry_run=self.dry_run
)
+ if _build_ext is not _du_build_ext:
+ # 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
+ # Then do any actual SWIG stuff on the remainder
+ return _du_build_ext.swig_sources(self, sources, *otherargs)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+