Blame SOURCES/00138-fix-distutils-tests-in-debug-build.patch

6e8c2f
diff -up Python-2.7.2/Lib/distutils/tests/test_build_ext.py.mark-tests-that-fail-in-rpmbuild Python-2.7.2/Lib/distutils/tests/test_build_ext.py
6e8c2f
--- Python-2.7.2/Lib/distutils/tests/test_build_ext.py.mark-tests-that-fail-in-rpmbuild	2011-09-08 16:07:25.033834312 -0400
6e8c2f
+++ Python-2.7.2/Lib/distutils/tests/test_build_ext.py	2011-09-08 17:43:15.656441082 -0400
6e8c2f
@@ -330,6 +332,7 @@ class BuildExtTestCase(support.TempdirMa
6e8c2f
         self.assertEqual(lastdir, 'bar')
6e8c2f
 
6e8c2f
     def test_ext_fullpath(self):
6e8c2f
+        debug_ext = sysconfig.get_config_var("DEBUG_EXT")
6e8c2f
         ext = sysconfig.get_config_vars()['SO']
6e8c2f
         dist = Distribution()
6e8c2f
         cmd = build_ext(dist)
6e8c2f
@@ -337,14 +340,14 @@ class BuildExtTestCase(support.TempdirMa
6e8c2f
         cmd.distribution.package_dir = {'': 'src'}
6e8c2f
         cmd.distribution.packages = ['lxml', 'lxml.html']
6e8c2f
         curdir = os.getcwd()
6e8c2f
-        wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext)
6e8c2f
+        wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + debug_ext + ext)
6e8c2f
         path = cmd.get_ext_fullpath('lxml.etree')
6e8c2f
         self.assertEqual(wanted, path)
6e8c2f
 
6e8c2f
         # building lxml.etree not inplace
6e8c2f
         cmd.inplace = 0
6e8c2f
         cmd.build_lib = os.path.join(curdir, 'tmpdir')
6e8c2f
-        wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree' + ext)
6e8c2f
+        wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree' + debug_ext + ext)
6e8c2f
         path = cmd.get_ext_fullpath('lxml.etree')
6e8c2f
         self.assertEqual(wanted, path)
6e8c2f
 
6e8c2f
@@ -354,13 +357,13 @@ class BuildExtTestCase(support.TempdirMa
6e8c2f
         cmd.distribution.packages = ['twisted', 'twisted.runner.portmap']
6e8c2f
         path = cmd.get_ext_fullpath('twisted.runner.portmap')
6e8c2f
         wanted = os.path.join(curdir, 'tmpdir', 'twisted', 'runner',
6e8c2f
-                              'portmap' + ext)
6e8c2f
+                              'portmap' + debug_ext + ext)
6e8c2f
         self.assertEqual(wanted, path)
6e8c2f
 
6e8c2f
         # building twisted.runner.portmap inplace
6e8c2f
         cmd.inplace = 1
6e8c2f
         path = cmd.get_ext_fullpath('twisted.runner.portmap')
6e8c2f
-        wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap' + ext)
6e8c2f
+        wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap' + debug_ext + ext)
6e8c2f
         self.assertEqual(wanted, path)
6e8c2f
 
6e8c2f
     def test_build_ext_inplace(self):
6e8c2f
@@ -373,8 +376,9 @@ class BuildExtTestCase(support.TempdirMa
6e8c2f
         cmd.distribution.package_dir = {'': 'src'}
6e8c2f
         cmd.distribution.packages = ['lxml', 'lxml.html']
6e8c2f
         curdir = os.getcwd()
6e8c2f
+        debug_ext = sysconfig.get_config_var("DEBUG_EXT")
6e8c2f
         ext = sysconfig.get_config_var("SO")
6e8c2f
-        wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext)
6e8c2f
+        wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + debug_ext + ext)
6e8c2f
         path = cmd.get_ext_fullpath('lxml.etree')
6e8c2f
         self.assertEqual(wanted, path)
6e8c2f
 
6e8c2f
@@ -412,10 +416,11 @@ class BuildExtTestCase(support.TempdirMa
6e8c2f
         dist = Distribution({'name': 'UpdateManager'})
6e8c2f
         cmd = build_ext(dist)
6e8c2f
         cmd.ensure_finalized()
6e8c2f
+        debug_ext = sysconfig.get_config_var("DEBUG_EXT")
6e8c2f
         ext = sysconfig.get_config_var("SO")
6e8c2f
         ext_name = os.path.join('UpdateManager', 'fdsend')
6e8c2f
         ext_path = cmd.get_ext_fullpath(ext_name)
6e8c2f
-        wanted = os.path.join(cmd.build_lib, 'UpdateManager', 'fdsend' + ext)
6e8c2f
+        wanted = os.path.join(cmd.build_lib, 'UpdateManager', 'fdsend' + debug_ext + ext)
6e8c2f
         self.assertEqual(ext_path, wanted)
6e8c2f
 
6e8c2f
     def test_build_ext_path_cross_platform(self):