20917217 imp.find_module() in python3.4 can't find native modules s11-update
authorJohn Beck <John.Beck@Oracle.COM>
Mon, 27 Apr 2015 14:08:52 -0700
branchs11-update
changeset 4228 52da6acd4360
parent 4227 35a4398c64cb
child 4229 847254ab97d9
20917217 imp.find_module() in python3.4 can't find native modules
components/python/python34/patches/06-solaris-64-bit.patch
--- a/components/python/python34/patches/06-solaris-64-bit.patch	Wed Apr 29 16:36:59 2015 -0700
+++ b/components/python/python34/patches/06-solaris-64-bit.patch	Mon Apr 27 14:08:52 2015 -0700
@@ -124,6 +124,23 @@
          self.assertEqual(global_sysconfig.get_config_var('CC'),
                           sysconfig.get_config_var('CC'))
  
+--- Python-3.4.3/Lib/imp.py.~1~	2015-02-25 03:27:44.000000000 -0800
++++ Python-3.4.3/Lib/imp.py	2015-04-27 11:24:24.814046529 -0700
[email protected]@ -287,7 +287,13 @@
+                 return None, package_directory, ('', '', PKG_DIRECTORY)
+         for suffix, mode, type_ in get_suffixes():
+             file_name = name + suffix
+-            file_path = os.path.join(entry, file_name)
++            # If in 64-bit mode, append /64 to the path for .so files
++            # (if not already there).
++            if type_ == C_EXTENSION and sys.maxsize != 2**31 - 1 and \
++               entry[-3:] != '/64':
++                file_path = os.path.join(entry, "64", file_name)
++            else:
++                file_path = os.path.join(entry, file_name)
+             if os.path.isfile(file_path):
+                 break
+         else:
 --- Python-3.4.1/Lib/importlib/_bootstrap.py.~1~	2014-05-18 22:19:38.000000000 -0700
 +++ Python-3.4.1/Lib/importlib/_bootstrap.py	2014-08-27 08:46:00.145242823 -0700
 @@ -2046,6 +2046,14 @@