components/python/python34/patches/06-solaris-64-bit.patch
author John Beck <John.Beck@Oracle.COM>
Mon, 02 Feb 2015 18:48:58 -0800
branchs11-update
changeset 3786 fa9d2da4d216
parent 3785 6a3f91179f05
child 4209 107a604ac200
permissions -rw-r--r--
19782913 update Python to 3.4.2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3782
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
     1
This patch ensures that 64-bit shared objects are put in and found in a
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
     2
subdirectory named "64".  Note that the changes to the
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
     3
Lib/distutils/tests/test_build_ext.py and .../test_sysconfig.py avoid running
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
     4
tests that fail due to this patch.  As the patch is Solaris-specific, it is
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
     5
not suitable for upstream.
3778
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
     6
3786
fa9d2da4d216 19782913 update Python to 3.4.2
John Beck <John.Beck@Oracle.COM>
parents: 3785
diff changeset
     7
--- Python-3.4.2/Lib/distutils/command/build_ext.py.~1~	2014-09-22 05:56:59.000000000 -0700
fa9d2da4d216 19782913 update Python to 3.4.2
John Beck <John.Beck@Oracle.COM>
parents: 3785
diff changeset
     8
+++ Python-3.4.2/Lib/distutils/command/build_ext.py	2014-09-22 14:05:09.231795935 -0700
fa9d2da4d216 19782913 update Python to 3.4.2
John Beck <John.Beck@Oracle.COM>
parents: 3785
diff changeset
     9
@@ -659,6 +659,9 @@
3778
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    10
         ext_suffix = get_config_var('EXT_SUFFIX')
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    11
         if os.name == 'nt' and self.debug:
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    12
             return os.path.join(*ext_path) + '_d' + ext_suffix
3782
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    13
+        if sys.maxsize == 2 ** 31 - 1:
3778
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    14
+            return os.path.join(*ext_path) + ext_suffix
3782
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    15
+        ext_path[-1:-1] = ["64"]
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    16
         return os.path.join(*ext_path) + ext_suffix
3778
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    17
 
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    18
     def get_export_symbols(self, ext):
3786
fa9d2da4d216 19782913 update Python to 3.4.2
John Beck <John.Beck@Oracle.COM>
parents: 3785
diff changeset
    19
--- Python-3.4.2/Lib/distutils/tests/test_build_ext.py.~1~	2014-09-22 05:56:59.000000000 -0700
fa9d2da4d216 19782913 update Python to 3.4.2
John Beck <John.Beck@Oracle.COM>
parents: 3785
diff changeset
    20
+++ Python-3.4.2/Lib/distutils/tests/test_build_ext.py	2014-09-22 14:08:54.798141164 -0700
fa9d2da4d216 19782913 update Python to 3.4.2
John Beck <John.Beck@Oracle.COM>
parents: 3785
diff changeset
    21
@@ -315,7 +315,8 @@
3778
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    22
         ext_suffix = sysconfig.get_config_var('EXT_SUFFIX')
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    23
         self.assertTrue(so_file.endswith(ext_suffix))
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    24
         so_dir = os.path.dirname(so_file)
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    25
-        self.assertEqual(so_dir, other_tmp_dir)
3782
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    26
+        if sys.platform != 'sunos5':
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    27
+            self.assertEqual(so_dir, other_tmp_dir)
3778
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    28
 
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    29
         cmd.inplace = 0
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    30
         cmd.compiler = None
3786
fa9d2da4d216 19782913 update Python to 3.4.2
John Beck <John.Beck@Oracle.COM>
parents: 3785
diff changeset
    31
@@ -324,7 +325,8 @@
3782
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    32
         self.assertTrue(os.path.exists(so_file))
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    33
         self.assertTrue(so_file.endswith(ext_suffix))
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    34
         so_dir = os.path.dirname(so_file)
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    35
-        self.assertEqual(so_dir, cmd.build_lib)
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    36
+        if sys.platform != 'sunos5':
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    37
+            self.assertEqual(so_dir, cmd.build_lib)
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    38
 
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    39
         # inplace = 0, cmd.package = 'bar'
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    40
         build_py = cmd.get_finalized_command('build_py')
3786
fa9d2da4d216 19782913 update Python to 3.4.2
John Beck <John.Beck@Oracle.COM>
parents: 3785
diff changeset
    41
@@ -332,7 +334,8 @@
3782
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    42
         path = cmd.get_ext_fullpath('foo')
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    43
         # checking that the last directory is the build_dir
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    44
         path = os.path.split(path)[0]
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    45
-        self.assertEqual(path, cmd.build_lib)
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    46
+        if sys.platform != 'sunos5':
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    47
+            self.assertEqual(path, cmd.build_lib)
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    48
 
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    49
         # inplace = 1, cmd.package = 'bar'
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    50
         cmd.inplace = 1
3786
fa9d2da4d216 19782913 update Python to 3.4.2
John Beck <John.Beck@Oracle.COM>
parents: 3785
diff changeset
    51
@@ -346,7 +349,8 @@
3782
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    52
         # checking that the last directory is bar
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    53
         path = os.path.split(path)[0]
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    54
         lastdir = os.path.split(path)[-1]
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    55
-        self.assertEqual(lastdir, 'bar')
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    56
+        if sys.platform != 'sunos5':
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    57
+            self.assertEqual(lastdir, 'bar')
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    58
 
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    59
     def test_ext_fullpath(self):
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    60
         ext = sysconfig.get_config_var('EXT_SUFFIX')
3786
fa9d2da4d216 19782913 update Python to 3.4.2
John Beck <John.Beck@Oracle.COM>
parents: 3785
diff changeset
    61
@@ -362,14 +366,16 @@
3778
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    62
         curdir = os.getcwd()
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    63
         wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext)
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    64
         path = cmd.get_ext_fullpath('lxml.etree')
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    65
-        self.assertEqual(wanted, path)
3782
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    66
+        if sys.platform != 'sunos5':
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    67
+            self.assertEqual(wanted, path)
3778
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    68
 
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    69
         # building lxml.etree not inplace
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
    70
         cmd.inplace = 0
3782
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    71
         cmd.build_lib = os.path.join(curdir, 'tmpdir')
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    72
         wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree' + ext)
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    73
         path = cmd.get_ext_fullpath('lxml.etree')
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    74
-        self.assertEqual(wanted, path)
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    75
+        if sys.platform != 'sunos5':
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    76
+            self.assertEqual(wanted, path)
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    77
 
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    78
         # building twisted.runner.portmap not inplace
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    79
         build_py = cmd.get_finalized_command('build_py')
3786
fa9d2da4d216 19782913 update Python to 3.4.2
John Beck <John.Beck@Oracle.COM>
parents: 3785
diff changeset
    80
@@ -378,13 +384,15 @@
3782
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    81
         path = cmd.get_ext_fullpath('twisted.runner.portmap')
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    82
         wanted = os.path.join(curdir, 'tmpdir', 'twisted', 'runner',
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    83
                               'portmap' + ext)
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    84
-        self.assertEqual(wanted, path)
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    85
+        if sys.platform != 'sunos5':
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    86
+            self.assertEqual(wanted, path)
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    87
 
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    88
         # building twisted.runner.portmap inplace
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    89
         cmd.inplace = 1
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    90
         path = cmd.get_ext_fullpath('twisted.runner.portmap')
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    91
         wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap' + ext)
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    92
-        self.assertEqual(wanted, path)
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    93
+        if sys.platform != 'sunos5':
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    94
+            self.assertEqual(wanted, path)
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    95
 
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    96
 
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
    97
     @unittest.skipUnless(sys.platform == 'darwin', 'test only relevant for MacOSX')
3786
fa9d2da4d216 19782913 update Python to 3.4.2
John Beck <John.Beck@Oracle.COM>
parents: 3785
diff changeset
    98
--- Python-3.4.2/Lib/distutils/tests/test_sysconfig.py.~1~	2014-09-22 05:56:59.000000000 -0700
fa9d2da4d216 19782913 update Python to 3.4.2
John Beck <John.Beck@Oracle.COM>
parents: 3785
diff changeset
    99
+++ Python-3.4.2/Lib/distutils/tests/test_sysconfig.py	2014-09-22 14:10:18.427824361 -0700
3782
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   100
@@ -1,4 +1,5 @@
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   101
 """Tests for distutils.sysconfig."""
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   102
+import sys
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   103
 import os
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   104
 import shutil
3786
fa9d2da4d216 19782913 update Python to 3.4.2
John Beck <John.Beck@Oracle.COM>
parents: 3785
diff changeset
   105
 import subprocess
fa9d2da4d216 19782913 update Python to 3.4.2
John Beck <John.Beck@Oracle.COM>
parents: 3785
diff changeset
   106
@@ -127,6 +128,8 @@
3782
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   107
 
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   108
     def test_sysconfig_module(self):
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   109
         import sysconfig as global_sysconfig
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   110
+        if sys.platform == 'sunos5':
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   111
+            return
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   112
         self.assertEqual(global_sysconfig.get_config_var('CFLAGS'),
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   113
                          sysconfig.get_config_var('CFLAGS'))
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   114
         self.assertEqual(global_sysconfig.get_config_var('LDFLAGS'),
3786
fa9d2da4d216 19782913 update Python to 3.4.2
John Beck <John.Beck@Oracle.COM>
parents: 3785
diff changeset
   115
@@ -152,8 +155,9 @@
3782
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   116
         import sysconfig as global_sysconfig
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   117
         if sysconfig.get_config_var('CUSTOMIZED_OSX_COMPILER'):
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   118
             self.skipTest('compiler flags customized')
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   119
-        self.assertEqual(global_sysconfig.get_config_var('LDSHARED'),
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   120
-                         sysconfig.get_config_var('LDSHARED'))
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   121
+        if sys.platform != 'sunos5':
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   122
+            self.assertEqual(global_sysconfig.get_config_var('LDSHARED'),
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   123
+                             sysconfig.get_config_var('LDSHARED'))
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   124
         self.assertEqual(global_sysconfig.get_config_var('CC'),
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   125
                          sysconfig.get_config_var('CC'))
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   126
 
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   127
--- Python-3.4.1/Lib/importlib/_bootstrap.py.~1~	2014-05-18 22:19:38.000000000 -0700
3783
9edbfb2ff34a 19492342 Python 3.4 should be built --with-pymalloc
John Beck <John.Beck@Oracle.COM>
parents: 3782
diff changeset
   128
+++ Python-3.4.1/Lib/importlib/_bootstrap.py	2014-08-27 08:46:00.145242823 -0700
3785
6a3f91179f05 19877230 importing native module causes python 3.4 to fail further imports from .py files
John Beck <John.Beck@Oracle.COM>
parents: 3783
diff changeset
   129
@@ -2046,6 +2046,14 @@
3782
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   130
                 is_namespace = _path_isdir(base_path)
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   131
         # Check for a file w/ a proper suffix exists.
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   132
         for suffix, loader_class in self._loaders:
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   133
+            message = 'checking {!r}: {!r}'.format(self.path, suffix)
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   134
+            _verbose_message(message, verbosity=2)
3783
9edbfb2ff34a 19492342 Python 3.4 should be built --with-pymalloc
John Beck <John.Beck@Oracle.COM>
parents: 3782
diff changeset
   135
+            # If in 64-bit mode, append /64 to the path for .so files.
9edbfb2ff34a 19492342 Python 3.4 should be built --with-pymalloc
John Beck <John.Beck@Oracle.COM>
parents: 3782
diff changeset
   136
+            if suffix.endswith('.so') and sys.maxsize != 2 ** 31 - 1:
3782
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   137
+                full_path = _path_join(self.path, '64', tail_module + suffix)
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   138
+                _verbose_message('trying {}'.format(full_path), verbosity=2)
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   139
+                if _path_isfile(full_path):
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   140
+                    return self._get_spec(loader_class, fullname, full_path, None, target)
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   141
             full_path = _path_join(self.path, tail_module + suffix)
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   142
             _verbose_message('trying {}'.format(full_path), verbosity=2)
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   143
             if cache_module + suffix in cache:
3778
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   144
--- Python-3.4.0/Lib/sysconfig.py.~1~	2014-03-16 19:31:30.000000000 -0700
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   145
+++ Python-3.4.0/Lib/sysconfig.py	2014-03-17 13:18:10.099539252 -0700
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   146
@@ -392,7 +392,11 @@
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   147
     if hasattr(sys, "gettotalrefcount"):
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   148
         pybuilddir += '-pydebug'
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   149
     os.makedirs(pybuilddir, exist_ok=True)
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   150
-    destfile = os.path.join(pybuilddir, name + '.py')
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   151
+    if sys.maxsize == 2147483647:
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   152
+        destfile = os.path.join(pybuilddir, name + '.py')
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   153
+    else:
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   154
+        os.makedirs(pybuilddir + '/64', exist_ok=True)
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   155
+        destfile = os.path.join(pybuilddir + '/64', name + '.py')
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   156
 
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   157
     with open(destfile, 'w', encoding='utf8') as f:
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   158
         f.write('# system configuration generated and used by'
3782
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   159
--- Python-3.4.0/Modules/getpath.c.~1~ 2014-03-16 19:31:31.000000000 -0700
689605272627 19339814 Python 3.4 needs tweak to find shared objects under vendor-packages
John Beck <John.Beck@Oracle.COM>
parents: 3778
diff changeset
   160
+++ Python-3.4.0/Modules/getpath.c     2014-04-25 15:02:02.837613851 -0700
3778
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   161
@@ -697,6 +697,10 @@
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   162
         wcsncpy(exec_prefix, _exec_prefix, MAXPATHLEN);
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   163
         joinpath(exec_prefix, L"lib/lib-dynload");
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   164
     }
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   165
+    if (sizeof(void *) == 8 && wcslen(exec_prefix) + 3 <= MAXPATHLEN) {
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   166
+        wcscat(exec_prefix, L"/64");
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   167
+    }
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   168
+
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   169
     /* If we found EXEC_PREFIX do *not* reduce it!  (Yet.) */
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   170
 
35735ffdda43 PSARC 2014/151 Python 3.4
John Beck <John.Beck@Oracle.COM>
parents:
diff changeset
   171
     if ((!pfound || !efound) && !Py_FrozenFlag)