components/python/python34/patches/06-solaris-64-bit.patch
changeset 2183 5d00686e81da
parent 2168 416ecfb814c9
child 4209 107a604ac200
equal deleted inserted replaced
2182:9f1202f3ddbd 2183:5d00686e81da
     2 subdirectory named "64".  Note that the changes to the
     2 subdirectory named "64".  Note that the changes to the
     3 Lib/distutils/tests/test_build_ext.py and .../test_sysconfig.py avoid running
     3 Lib/distutils/tests/test_build_ext.py and .../test_sysconfig.py avoid running
     4 tests that fail due to this patch.  As the patch is Solaris-specific, it is
     4 tests that fail due to this patch.  As the patch is Solaris-specific, it is
     5 not suitable for upstream.
     5 not suitable for upstream.
     6 
     6 
     7 --- Python-3.4.1/Lib/distutils/command/build_ext.py.~1~	2014-05-18 22:19:37.000000000 -0700
     7 --- Python-3.4.2/Lib/distutils/command/build_ext.py.~1~	2014-09-22 05:56:59.000000000 -0700
     8 +++ Python-3.4.1/Lib/distutils/command/build_ext.py	2014-08-05 16:07:07.494400637 -0700
     8 +++ Python-3.4.2/Lib/distutils/command/build_ext.py	2014-09-22 14:05:09.231795935 -0700
     9 @@ -668,6 +668,9 @@
     9 @@ -659,6 +659,9 @@
    10          ext_suffix = get_config_var('EXT_SUFFIX')
    10          ext_suffix = get_config_var('EXT_SUFFIX')
    11          if os.name == 'nt' and self.debug:
    11          if os.name == 'nt' and self.debug:
    12              return os.path.join(*ext_path) + '_d' + ext_suffix
    12              return os.path.join(*ext_path) + '_d' + ext_suffix
    13 +        if sys.maxsize == 2 ** 31 - 1:
    13 +        if sys.maxsize == 2 ** 31 - 1:
    14 +            return os.path.join(*ext_path) + ext_suffix
    14 +            return os.path.join(*ext_path) + ext_suffix
    15 +        ext_path[-1:-1] = ["64"]
    15 +        ext_path[-1:-1] = ["64"]
    16          return os.path.join(*ext_path) + ext_suffix
    16          return os.path.join(*ext_path) + ext_suffix
    17  
    17  
    18      def get_export_symbols(self, ext):
    18      def get_export_symbols(self, ext):
    19 --- Python-3.4.1/Lib/distutils/tests/test_build_ext.py.~1~	2014-05-18 22:19:38.000000000 -0700
    19 --- Python-3.4.2/Lib/distutils/tests/test_build_ext.py.~1~	2014-09-22 05:56:59.000000000 -0700
    20 +++ Python-3.4.1/Lib/distutils/tests/test_build_ext.py	2014-08-05 15:28:29.067709834 -0700
    20 +++ Python-3.4.2/Lib/distutils/tests/test_build_ext.py	2014-09-22 14:08:54.798141164 -0700
    21 @@ -317,7 +317,8 @@
    21 @@ -315,7 +315,8 @@
    22          ext_suffix = sysconfig.get_config_var('EXT_SUFFIX')
    22          ext_suffix = sysconfig.get_config_var('EXT_SUFFIX')
    23          self.assertTrue(so_file.endswith(ext_suffix))
    23          self.assertTrue(so_file.endswith(ext_suffix))
    24          so_dir = os.path.dirname(so_file)
    24          so_dir = os.path.dirname(so_file)
    25 -        self.assertEqual(so_dir, other_tmp_dir)
    25 -        self.assertEqual(so_dir, other_tmp_dir)
    26 +        if sys.platform != 'sunos5':
    26 +        if sys.platform != 'sunos5':
    27 +            self.assertEqual(so_dir, other_tmp_dir)
    27 +            self.assertEqual(so_dir, other_tmp_dir)
    28  
    28  
    29          cmd.inplace = 0
    29          cmd.inplace = 0
    30          cmd.compiler = None
    30          cmd.compiler = None
    31 @@ -326,7 +327,8 @@
    31 @@ -324,7 +325,8 @@
    32          self.assertTrue(os.path.exists(so_file))
    32          self.assertTrue(os.path.exists(so_file))
    33          self.assertTrue(so_file.endswith(ext_suffix))
    33          self.assertTrue(so_file.endswith(ext_suffix))
    34          so_dir = os.path.dirname(so_file)
    34          so_dir = os.path.dirname(so_file)
    35 -        self.assertEqual(so_dir, cmd.build_lib)
    35 -        self.assertEqual(so_dir, cmd.build_lib)
    36 +        if sys.platform != 'sunos5':
    36 +        if sys.platform != 'sunos5':
    37 +            self.assertEqual(so_dir, cmd.build_lib)
    37 +            self.assertEqual(so_dir, cmd.build_lib)
    38  
    38  
    39          # inplace = 0, cmd.package = 'bar'
    39          # inplace = 0, cmd.package = 'bar'
    40          build_py = cmd.get_finalized_command('build_py')
    40          build_py = cmd.get_finalized_command('build_py')
    41 @@ -334,7 +336,8 @@
    41 @@ -332,7 +334,8 @@
    42          path = cmd.get_ext_fullpath('foo')
    42          path = cmd.get_ext_fullpath('foo')
    43          # checking that the last directory is the build_dir
    43          # checking that the last directory is the build_dir
    44          path = os.path.split(path)[0]
    44          path = os.path.split(path)[0]
    45 -        self.assertEqual(path, cmd.build_lib)
    45 -        self.assertEqual(path, cmd.build_lib)
    46 +        if sys.platform != 'sunos5':
    46 +        if sys.platform != 'sunos5':
    47 +            self.assertEqual(path, cmd.build_lib)
    47 +            self.assertEqual(path, cmd.build_lib)
    48  
    48  
    49          # inplace = 1, cmd.package = 'bar'
    49          # inplace = 1, cmd.package = 'bar'
    50          cmd.inplace = 1
    50          cmd.inplace = 1
    51 @@ -348,7 +351,8 @@
    51 @@ -346,7 +349,8 @@
    52          # checking that the last directory is bar
    52          # checking that the last directory is bar
    53          path = os.path.split(path)[0]
    53          path = os.path.split(path)[0]
    54          lastdir = os.path.split(path)[-1]
    54          lastdir = os.path.split(path)[-1]
    55 -        self.assertEqual(lastdir, 'bar')
    55 -        self.assertEqual(lastdir, 'bar')
    56 +        if sys.platform != 'sunos5':
    56 +        if sys.platform != 'sunos5':
    57 +            self.assertEqual(lastdir, 'bar')
    57 +            self.assertEqual(lastdir, 'bar')
    58  
    58  
    59      def test_ext_fullpath(self):
    59      def test_ext_fullpath(self):
    60          ext = sysconfig.get_config_var('EXT_SUFFIX')
    60          ext = sysconfig.get_config_var('EXT_SUFFIX')
    61 @@ -364,14 +368,16 @@
    61 @@ -362,14 +366,16 @@
    62          curdir = os.getcwd()
    62          curdir = os.getcwd()
    63          wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext)
    63          wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext)
    64          path = cmd.get_ext_fullpath('lxml.etree')
    64          path = cmd.get_ext_fullpath('lxml.etree')
    65 -        self.assertEqual(wanted, path)
    65 -        self.assertEqual(wanted, path)
    66 +        if sys.platform != 'sunos5':
    66 +        if sys.platform != 'sunos5':
    75 +        if sys.platform != 'sunos5':
    75 +        if sys.platform != 'sunos5':
    76 +            self.assertEqual(wanted, path)
    76 +            self.assertEqual(wanted, path)
    77  
    77  
    78          # building twisted.runner.portmap not inplace
    78          # building twisted.runner.portmap not inplace
    79          build_py = cmd.get_finalized_command('build_py')
    79          build_py = cmd.get_finalized_command('build_py')
    80 @@ -380,13 +386,15 @@
    80 @@ -378,13 +384,15 @@
    81          path = cmd.get_ext_fullpath('twisted.runner.portmap')
    81          path = cmd.get_ext_fullpath('twisted.runner.portmap')
    82          wanted = os.path.join(curdir, 'tmpdir', 'twisted', 'runner',
    82          wanted = os.path.join(curdir, 'tmpdir', 'twisted', 'runner',
    83                                'portmap' + ext)
    83                                'portmap' + ext)
    84 -        self.assertEqual(wanted, path)
    84 -        self.assertEqual(wanted, path)
    85 +        if sys.platform != 'sunos5':
    85 +        if sys.platform != 'sunos5':
    93 +        if sys.platform != 'sunos5':
    93 +        if sys.platform != 'sunos5':
    94 +            self.assertEqual(wanted, path)
    94 +            self.assertEqual(wanted, path)
    95  
    95  
    96  
    96  
    97      @unittest.skipUnless(sys.platform == 'darwin', 'test only relevant for MacOSX')
    97      @unittest.skipUnless(sys.platform == 'darwin', 'test only relevant for MacOSX')
    98 --- Python-3.4.1/Lib/distutils/tests/test_sysconfig.py.~1~	2014-05-18 22:19:38.000000000 -0700
    98 --- Python-3.4.2/Lib/distutils/tests/test_sysconfig.py.~1~	2014-09-22 05:56:59.000000000 -0700
    99 +++ Python-3.4.1/Lib/distutils/tests/test_sysconfig.py	2014-08-05 13:11:56.906745265 -0700
    99 +++ Python-3.4.2/Lib/distutils/tests/test_sysconfig.py	2014-09-22 14:10:18.427824361 -0700
   100 @@ -1,4 +1,5 @@
   100 @@ -1,4 +1,5 @@
   101  """Tests for distutils.sysconfig."""
   101  """Tests for distutils.sysconfig."""
   102 +import sys
   102 +import sys
   103  import os
   103  import os
   104  import shutil
   104  import shutil
   105  import unittest
   105  import subprocess
   106 @@ -124,6 +125,8 @@
   106 @@ -127,6 +128,8 @@
   107  
   107  
   108      def test_sysconfig_module(self):
   108      def test_sysconfig_module(self):
   109          import sysconfig as global_sysconfig
   109          import sysconfig as global_sysconfig
   110 +        if sys.platform == 'sunos5':
   110 +        if sys.platform == 'sunos5':
   111 +            return
   111 +            return
   112          self.assertEqual(global_sysconfig.get_config_var('CFLAGS'),
   112          self.assertEqual(global_sysconfig.get_config_var('CFLAGS'),
   113                           sysconfig.get_config_var('CFLAGS'))
   113                           sysconfig.get_config_var('CFLAGS'))
   114          self.assertEqual(global_sysconfig.get_config_var('LDFLAGS'),
   114          self.assertEqual(global_sysconfig.get_config_var('LDFLAGS'),
   115 @@ -149,8 +152,9 @@
   115 @@ -152,8 +155,9 @@
   116          import sysconfig as global_sysconfig
   116          import sysconfig as global_sysconfig
   117          if sysconfig.get_config_var('CUSTOMIZED_OSX_COMPILER'):
   117          if sysconfig.get_config_var('CUSTOMIZED_OSX_COMPILER'):
   118              self.skipTest('compiler flags customized')
   118              self.skipTest('compiler flags customized')
   119 -        self.assertEqual(global_sysconfig.get_config_var('LDSHARED'),
   119 -        self.assertEqual(global_sysconfig.get_config_var('LDSHARED'),
   120 -                         sysconfig.get_config_var('LDSHARED'))
   120 -                         sysconfig.get_config_var('LDSHARED'))