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

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