File python-3.2-linux3.patch of Package python3

Index: Python-3.2/Lib/distutils/tests/test_bdist_rpm.py
===================================================================
--- Python-3.2.orig/Lib/distutils/tests/test_bdist_rpm.py
+++ Python-3.2/Lib/distutils/tests/test_bdist_rpm.py
@@ -42,7 +42,7 @@ class BuildRpmTestCase(support.TempdirMa
 
         # XXX I am unable yet to make this test work without
         # spurious sdtout/stderr output under Mac OS X
-        if sys.platform != 'linux2':
+        if not sys.platform.startswith('linux'):
             return
 
         # this test will run only if the rpm commands are found
@@ -82,7 +82,7 @@ class BuildRpmTestCase(support.TempdirMa
 
         # XXX I am unable yet to make this test work without
         # spurious sdtout/stderr output under Mac OS X
-        if sys.platform != 'linux2':
+        if not sys.platform.startswith('linux'):
             return
 
         # http://bugs.python.org/issue1533164
Index: Python-3.2/Lib/distutils/tests/test_util.py
===================================================================
--- Python-3.2.orig/Lib/distutils/tests/test_util.py
+++ Python-3.2/Lib/distutils/tests/test_util.py
@@ -157,6 +157,15 @@ class UtilTestCase(support.EnvironGuard,
 
         self.assertEqual(get_platform(), 'linux-i686')
 
+        # openSUSE linux3
+        os.name = 'posix'
+        sys.version = ('2.7 (r27:82500, Aug 07 2010, 16:54:59) [GCC]')
+        sys.platform = 'linux3'
+        self._set_uname(('Linux', 'ws-pool1', '2.6.37.6-0.5-desktop',
+                    '#1 SMP PREEMPT 2011-04-25 21:48:33 +0200', 'x86_64'))
+
+        self.assertEqual(get_platform(), 'linux-x86_64')
+
         # XXX more platforms to tests here
 
     def test_convert_path(self):
Index: Python-3.2/Lib/test/regrtest.py
===================================================================
--- Python-3.2.orig/Lib/test/regrtest.py
+++ Python-3.2/Lib/test/regrtest.py
@@ -1433,6 +1433,7 @@ _expectations['freebsd5'] = _expectation
 _expectations['freebsd6'] = _expectations['freebsd4']
 _expectations['freebsd7'] = _expectations['freebsd4']
 _expectations['freebsd8'] = _expectations['freebsd4']
+_expectations['linux3'] = _expectations['linux2']
 
 class _ExpectedSkips:
     def __init__(self):
Index: Python-3.2/Lib/test/test_socket.py
===================================================================
--- Python-3.2.orig/Lib/test/test_socket.py
+++ Python-3.2/Lib/test/test_socket.py
@@ -1998,7 +1998,7 @@ def test_main():
     ])
     if hasattr(socket, "socketpair"):
         tests.append(BasicSocketPairTest)
-    if sys.platform == 'linux2':
+    if sys.platform.startswith('linux'):
         tests.append(TestLinuxAbstractNamespace)
     if isTipcAvailable():
         tests.append(TIPCTest)
Index: Python-3.2/Lib/test/test_sysconfig.py
===================================================================
--- Python-3.2.orig/Lib/test/test_sysconfig.py
+++ Python-3.2/Lib/test/test_sysconfig.py
@@ -228,6 +228,15 @@ class TestSysConfig(unittest.TestCase):
 
         self.assertEqual(get_platform(), 'linux-i686')
 
+        # openSUSE linux3
+        os.name = 'posix'
+        sys.version = ('2.7 (r27:82500, Aug 07 2010, 16:54:59) [GCC]')
+        sys.platform = 'linux3'
+        self._set_uname(('Linux', 'ws-pool1', '2.6.37.6-0.5-desktop',
+                    '#1 SMP PREEMPT 2011-04-25 21:48:33 +0200', 'x86_64'))
+
+        self.assertEqual(get_platform(), 'linux-x86_64')
+
         # XXX more platforms to tests here
 
     def test_get_config_h_filename(self):
Index: Python-3.2/Lib/test/test_tarfile.py
===================================================================
--- Python-3.2.orig/Lib/test/test_tarfile.py
+++ Python-3.2/Lib/test/test_tarfile.py
@@ -687,7 +687,7 @@ class GNUReadTest(LongnameTest):
         # Return True if the platform knows the st_blocks stat attribute and
         # uses st_blocks units of 512 bytes, and if the filesystem is able to
         # store holes in files.
-        if sys.platform == "linux2":
+        if sys.platform.startswith("linux"):
             # Linux evidentially has 512 byte st_blocks units.
             name = os.path.join(TEMPDIR, "sparse-test")
             with open(name, "wb") as fobj:
Index: Python-3.2/setup.py
===================================================================
--- Python-3.2.orig/setup.py
+++ Python-3.2/setup.py
@@ -1351,7 +1351,7 @@ class PyBuildExt(build_ext):
         # End multiprocessing
 
         # Platform-specific libraries
-        if (platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
+        if (platform in ('linux2', 'linux3', 'freebsd4', 'freebsd5', 'freebsd6',
                         'freebsd7', 'freebsd8')
             or platform.startswith("gnukfreebsd")):
             exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
openSUSE Build Service is sponsored by