Commit 1f065479 authored by PJ Eby's avatar PJ Eby

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
parent 50554a5c
......@@ -874,6 +874,9 @@ Known Issues
* Fixed not fully removing temporary directories on Windows, if a Subversion
checkout left read-only files behind
* Fixed some problems building extensions when Pyrex was installed, especially
with Python 2.4 and/or packages using SWIG.
0.6a7
* Fixed not being able to install Windows script wrappers using Python 2.3
......
......@@ -1873,6 +1873,10 @@ XXX
Release Notes/Change History
----------------------------
0.6a8
* Fixed some problems building extensions when Pyrex was installed, especially
with Python 2.4 and/or packages using SWIG.
0.6a5
* Fixed missing gui/cli .exe files in distribution. Fixed bugs in tests.
......
# 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):
......@@ -38,4 +38,45 @@ class build_ext(_build_ext):
src_filename, dest_filename, verbose=self.verbose,
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)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment