[pypy-commit] pypy py3.3: Same trick as ad57911bdbc4, allows to import ctypes.util.

amauryfa noreply at buildbot.pypy.org
Sat Apr 26 12:28:52 CEST 2014


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3.3
Changeset: r71003:70fa7b2907b1
Date: 2014-04-26 12:26 +0200
http://bitbucket.org/pypy/pypy/changeset/70fa7b2907b1/

Log:	Same trick as ad57911bdbc4, allows to import ctypes.util.

diff --git a/lib-python/3/ctypes/util.py b/lib-python/3/ctypes/util.py
--- a/lib-python/3/ctypes/util.py
+++ b/lib-python/3/ctypes/util.py
@@ -85,9 +85,10 @@
 
 elif os.name == "posix":
     # Andreas Degert's find functions, using gcc, /sbin/ldconfig, objdump
-    import re, tempfile, errno
+    import re, errno
 
     def _findLib_gcc(name):
+        import tempfile
         expr = r'[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name)
         fdout, ccout = tempfile.mkstemp()
         os.close(fdout)


More information about the pypy-commit mailing list