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

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