diff options
author | PJ Eby <distutils-sig@python.org> | 2005-11-03 03:55:42 +0000 |
---|---|---|
committer | PJ Eby <distutils-sig@python.org> | 2005-11-03 03:55:42 +0000 |
commit | 1f065479e3f02f168be10f0aad017bddfaa3580d (patch) | |
tree | 3dcec7ce4b126f4bc507631688991615ae8369f7 /setuptools/command/build_ext.py | |
parent | 50554a5ce775023ccf58fe4aafccd7102534829d (diff) | |
download | external_python_setuptools-1f065479e3f02f168be10f0aad017bddfaa3580d.tar.gz external_python_setuptools-1f065479e3f02f168be10f0aad017bddfaa3580d.tar.bz2 external_python_setuptools-1f065479e3f02f168be10f0aad017bddfaa3580d.zip |
Fixed some problems building extensions when Pyrex was installed, especially
with Python 2.4 and/or packages using SWIG.
--HG--
branch : setuptools
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041384
Diffstat (limited to 'setuptools/command/build_ext.py')
-rw-r--r-- | setuptools/command/build_ext.py | 49 |
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) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + |