[pypy-commit] pypy py3.5: Obscuuure. On Ubuntu specifically, for ncurses on pypy3 we need:
arigo
pypy.commits at gmail.com
Tue Jun 13 03:52:07 EDT 2017
Author: Armin Rigo <arigo at tunes.org>
Branch: py3.5
Changeset: r91598:518cd1383456
Date: 2017-06-13 09:51 +0200
http://bitbucket.org/pypy/pypy/changeset/518cd1383456/
Log: Obscuuure. On Ubuntu specifically, for ncurses on pypy3 we need:
(1) apt-get install libncursesw-dev
(2) add an include dir, otherwise it picks up another different
ncurses.h
diff --git a/lib_pypy/_curses_build.py b/lib_pypy/_curses_build.py
--- a/lib_pypy/_curses_build.py
+++ b/lib_pypy/_curses_build.py
@@ -1,3 +1,4 @@
+import os
from cffi import FFI, VerificationError
@@ -17,6 +18,11 @@
# error message
raise e_last
+def find_curses_include_dirs():
+ if os.path.exists('/usr/include/ncursesw'):
+ return ['/usr/include/ncursesw']
+ return []
+
ffi = FFI()
@@ -59,7 +65,8 @@
void _m_getsyx(int *yx) {
getsyx(yx[0], yx[1]);
}
-""", libraries=[find_curses_library(), 'panel'])
+""", libraries=[find_curses_library(), 'panel'],
+ include_dirs=find_curses_include_dirs())
ffi.cdef("""
More information about the pypy-commit
mailing list