Ke Wang-san wrote (02/18/09 03:35 PM):
> Thx!
>
> I'll try to get this upstreamed.
>
> Regards,
>
> Ke
>
> On Wed, 2009-02-18 at 14:34 +0900, Takao Fujiwara - Tokyo S/W Center
> wrote:
>> OK, I revised the patch.
>>
>> --- /usr/lib/python2.6/ctypes/util.py.orig 2009-02-17
>> 18:02:17.764163000 +0900
>> +++ /usr/lib/python2.6/ctypes/util.py 2009-02-18 14:32:02.741669000 +0900
>> @@ -156,6 +156,35 @@
>> res.sort(cmp= lambda x,y: cmp(_num_version(x),
>> _num_version(y)))
>> return res[-1]
>>
>> + elif (sys.platform.startswith("sunos")):
>> +
>> + def _findLib_crle(name, is64):
>> + if not os.path.exists('/usr/bin/crle'):
>> + return None
>> +
>> + if is64:
>> + cmd = 'env LC_MESSAGES=C /usr/bin/crle -64 2>/dev/null'
>> + else:
>> + cmd = 'env LC_MESSAGES=C /usr/bin/crle 2>/dev/null'
One correction.
LC_MESSAGES value is overrided by LC_ALL so I'd revise to use LC_ALL instead of
LC_MESSAGES.
- cmd = 'env LC_MESSAGES=C /usr/bin/crle 2>/dev/null'
+ cmd = 'env LC_ALL=C /usr/bin/crle 2>/dev/null'
>> +
>> + for line in os.popen(cmd).readlines():
>> + line = line.strip()
>> + if (line.startswith('Default Library Path (ELF):')):
>> + paths = line.split()[4]
>> +
>> + if not paths:
>> + return None
>> +
>> + for dir in paths.split(":"):
>> + libfile = os.path.join(dir, "lib%s.so" % name)
>> + if os.path.exists(libfile):
>> + return libfile
>> +
>> + return None
>> +
>> + def find_library(name, is64 = False):
>> + return _get_soname(_findLib_crle(name, is64) or
>> _findLib_gcc(name))
>> +
>> else:
>>
>> def _findLib_ldconfig(name):
>> _______________________________________________
>> desktop-discuss mailing list
>> desktop-discuss at opensolaris.org
>
>