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