[pypy-issue] [issue1467] Curses doesn't raise ImportError on Windows

schlamar tracker at bugs.pypy.org
Thu Apr 25 10:29:42 CEST 2013

New submission from schlamar <marc.schlaich at gmail.com>:

Some libraries try to import curses and use it if available (e.g. Tornado).

However, this approach shows some undesirable behavior on Windows:

>>>> try:
....   import curses
.... except ImportError:
....   pass
c:\pypy-2.0-beta2\lib_pypy\__pycache__\_cffi__g85535e98x310af836.c(26) : fatal error C1083: Datei (Include) kann 
nicht geöffnet werden: "ncurses.h": No such file or directory
Traceback (most recent call last):
  File "<console>", line 2, in <module>
  File "c:\pypy-2.0-beta2\lib-python\2.7\curses\__init__.py", line 15, in <module>
    from _curses import *
  File "c:\pypy-2.0-beta2\lib_pypy\_curses.py", line 319, in <module>
    """, libraries=['ncurses', 'panel'])
  File "c:\pypy-2.0-beta2\lib_pypy\cffi\api.py", line 311, in verify
    lib = self.verifier.load_library()
  File "c:\pypy-2.0-beta2\lib_pypy\cffi\verifier.py", line 68, in load_library
  File "c:\pypy-2.0-beta2\lib_pypy\cffi\verifier.py", line 56, in compile_module
  File "c:\pypy-2.0-beta2\lib_pypy\cffi\verifier.py", line 142, in _compile_module
    outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
  File "c:\pypy-2.0-beta2\lib_pypy\cffi\ffiplatform.py", line 25, in compile
    outputfilename = _build(tmpdir, ext)
  File "c:\pypy-2.0-beta2\lib_pypy\cffi\ffiplatform.py", line 50, in _build
    raise VerificationError('%s: %s' % (e.__class__.__name__, e))
VerificationError: CompileError: command 'C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe' 
failed with exit status 2

messages: 5635
nosy: pypy-issue, schlamar
priority: bug
release: 2.0
status: unread
title: Curses doesn't raise ImportError on Windows

PyPy bug tracker <tracker at bugs.pypy.org>

More information about the pypy-issue mailing list