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

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