packages/lang/python/patches/040-dont-import-cross-compiled-modules.patch
lars a456db34e4 Update python to 2.6.1.
Get rid of the virtual python-core package and instead python depends on
python-mini and provides files missing in python-mini for a full featured python
installation.
Thus also update the dependencies of various python packages.


git-svn-id: svn://svn.openwrt.org/openwrt/packages@14760 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-03-06 20:27:09 +00:00

42 lines
1.7 KiB
Diff

diff --git a/setup.py b/setup.py
index f7f190f..6ca7a1d 100644
--- a/setup.py
+++ b/setup.py
@@ -270,36 +270,6 @@ class PyBuildExt(build_ext):
ext_filename = os.path.join(
self.build_lib,
self.get_ext_filename(self.get_ext_fullname(ext.name)))
- try:
- imp.load_dynamic(ext.name, ext_filename)
- except ImportError, why:
- self.failed.append(ext.name)
- self.announce('*** WARNING: renaming "%s" since importing it'
- ' failed: %s' % (ext.name, why), level=3)
- assert not self.inplace
- basename, tail = os.path.splitext(ext_filename)
- newname = basename + "_failed" + tail
- if os.path.exists(newname):
- os.remove(newname)
- os.rename(ext_filename, newname)
-
- # XXX -- This relies on a Vile HACK in
- # distutils.command.build_ext.build_extension(). The
- # _built_objects attribute is stored there strictly for
- # use here.
- # If there is a failure, _built_objects may not be there,
- # so catch the AttributeError and move on.
- try:
- for filename in self._built_objects:
- os.remove(filename)
- except AttributeError:
- self.announce('unable to remove files (ignored)')
- except:
- exc_type, why, tb = sys.exc_info()
- self.announce('*** WARNING: importing extension "%s" '
- 'failed with %s: %s' % (ext.name, exc_type, why),
- level=3)
- self.failed.append(ext.name)
def get_platform(self):