summaryrefslogtreecommitdiff
path: root/package/python2/patches/patch-setup_py
blob: c0806af135595031d65a4fb4e8469ea59fdbfed5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
--- Python-2.7.orig/setup.py	2010-06-27 14:36:16.000000000 +0200
+++ Python-2.7/setup.py	2010-09-25 22:04:01.234088816 +0200
@@ -21,7 +21,7 @@ from distutils.spawn import find_executa
 COMPILED_WITH_PYDEBUG = hasattr(sys, 'gettotalrefcount')
 
 # This global variable is used to hold the list of modules to be disabled.
-disabled_module_list = []
+disabled_module_list = ['nis', 'bz2']
 
 def add_dir_to_list(dirlist, dir):
     """Add the directory 'dir' to the list 'dirlist' (at the front) if
@@ -307,36 +307,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):
         # Get value of sys.platform