[pypy-commit] pypy default: try fix issue 844 by breaking a circular import which appears on mac: ctypes.util --> macholib.dyld --> os.path.expanduser --> posixpath --> pwd --> ctypes_support --> ctypes.util

antocuni noreply at buildbot.pypy.org
Tue Aug 30 18:08:27 CEST 2011


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: 
Changeset: r46924:cf154677dac2
Date: 2011-08-30 18:06 +0200
http://bitbucket.org/pypy/pypy/changeset/cf154677dac2/

Log:	try fix issue 844 by breaking a circular import which appears on
	mac: ctypes.util --> macholib.dyld --> os.path.expanduser -->
	posixpath --> pwd --> ctypes_support --> ctypes.util

diff --git a/lib-python/modified-2.7/ctypes/util.py b/lib-python/modified-2.7/ctypes/util.py
--- a/lib-python/modified-2.7/ctypes/util.py
+++ b/lib-python/modified-2.7/ctypes/util.py
@@ -72,8 +72,8 @@
         return name
 
 if os.name == "posix" and sys.platform == "darwin":
-    from ctypes.macholib.dyld import dyld_find as _dyld_find
     def find_library(name):
+        from ctypes.macholib.dyld import dyld_find as _dyld_find
         possible = ['lib%s.dylib' % name,
                     '%s.dylib' % name,
                     '%s.framework/%s' % (name, name)]


More information about the pypy-commit mailing list