[pypy-issue] [issue844] Circular import in ctypes.util

vad tracker at bugs.pypy.org
Thu Aug 25 19:23:23 CEST 2011


New submission from vad <davide.setti at gmail.com>:

i'm trying to run djangobench on Pypy 1.6 and OsX Snow Leopard and i get this 
circular import:

$ djangobench 
Running all benchmarks
Control: Django 1.3 (in django-control)
Experiment: Django 1.3 (in django-experiment)

Running 'default_middleware' benchmark ...
Traceback (most recent call last):
  File "app_main.py", line 53, in run_toplevel
  File "/Users/vad/Source/Envs/djangobench-pypy16/bin/djangobench", line 8, in 
<module>
    load_entry_point('djangobench==0.9', 'console_scripts', 'djangobench')()
  File "/Users/vad/Source/Envs/djangobench-
pypy16/src/djangobench/djangobench/main.py", line 297, in main
    profile_dir = args.profile_dir
  File "/Users/vad/Source/Envs/djangobench-
pypy16/src/djangobench/djangobench/main.py", line 60, in run_benchmarks
    control_data = run_benchmark(benchmark, trials, control_env)
  File "/Users/vad/Source/Envs/djangobench-
pypy16/src/djangobench/djangobench/main.py", line 106, in run_benchmark
    out, _, _ = perf.CallAndCaptureOutput(command + ['-t', 1], env, 
track_memory=False, inherit_env=[])
  File "/Users/vad/Source/Envs/djangobench-
pypy16/src/djangobench/djangobench/perf.py", line 1026, in CallAndCaptureOutput
    raise RuntimeError("Benchmark died: " + stderr)
RuntimeError: Benchmark died: 'import site' failed
Traceback (most recent call last):
  File "app_main.py", line 53, in run_toplevel
  File "/Users/vad/Source/Envs/djangobench-
pypy16/src/djangobench/djangobench/benchmarks/default_middleware/benchmark.py", 
line 3, in <module>
    from django.test.client import Client
  File "/Users/vad/Source/Django/djangobench/django-
control/django/test/__init__.py", line 5, in <module>
    from django.test.client import Client, RequestFactory
  File "/Users/vad/Source/Django/djangobench/django-
control/django/test/client.py", line 1, in <module>
    import urllib
  File "/Users/vad/Software/pypy/pypy-1.6/lib-python/2.7/urllib.py", line 1348, 
in <module>
    from _scproxy import _get_proxy_settings, _get_proxies
  File "/Users/vad/Software/pypy/pypy-1.6/lib_pypy/_scproxy.py", line 11, in 
<module>
    from ctypes.util import find_library
  File "/Users/vad/Software/pypy/pypy-1.6/lib-python/modified-
2.7/ctypes/util.py", line 75, in <module>
    from ctypes.macholib.dyld import dyld_find as _dyld_find
  File "/Users/vad/Software/pypy/pypy-1.6/lib-python/modified-
2.7/ctypes/macholib/dyld.py", line 21, in <module>
    os.path.expanduser("~/Library/Frameworks"),
  File "/Users/vad/Source/Envs/djangobench-pypy16/lib-python/2.7/posixpath.py", 
line 259, in expanduser
    import pwd
  File "/Users/vad/Software/pypy/pypy-1.6/lib_pypy/pwd.py", line 17, in <module>
    from ctypes_support import standard_c_lib as libc
  File "/Users/vad/Software/pypy/pypy-1.6/lib_pypy/ctypes_support.py", line 16, 
in <module>
    standard_c_lib = ctypes.CDLL(ctypes.util.find_library('c'))
AttributeError: 'module' object has no attribute 'util'

----------
messages: 3013
nosy: pypy-issue, vad
priority: bug
status: unread
title: Circular import in ctypes.util

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue844>
________________________________________


More information about the pypy-issue mailing list