[Python-checkins] cpython (2.7): - Issue #17754: Make ctypes.util.find_library() independent of the locale.

matthias.klose python-checkins at python.org
Wed May 15 15:48:06 CEST 2013


http://hg.python.org/cpython/rev/4f594f9b296a
changeset:   83774:4f594f9b296a
branch:      2.7
parent:      83747:a32a3b79f5e8
user:        doko at ubuntu.com
date:        Wed May 15 15:46:11 2013 +0200
summary:
  - Issue #17754: Make ctypes.util.find_library() independent of the locale.

files:
  Lib/ctypes/util.py |  2 +-
  Misc/NEWS          |  1 +
  2 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py
--- a/Lib/ctypes/util.py
+++ b/Lib/ctypes/util.py
@@ -93,7 +93,7 @@
         fdout, ccout = tempfile.mkstemp()
         os.close(fdout)
         cmd = 'if type gcc >/dev/null 2>&1; then CC=gcc; elif type cc >/dev/null 2>&1; then CC=cc;else exit 10; fi;' \
-              '$CC -Wl,-t -o ' + ccout + ' 2>&1 -l' + name
+              'LANG=C LC_ALL=C $CC -Wl,-t -o ' + ccout + ' 2>&1 -l' + name
         try:
             f = os.popen(cmd)
             try:
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,7 @@
 Library
 -------
 
+- Issue #17754: Make ctypes.util.find_library() independent of the locale.
 
 What's New in Python 2.7.5?
 ===========================

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list