summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorNadeem Vawda <nadeem.vawda@gmail.com>2011-07-31 13:01:11 (GMT)
committerNadeem Vawda <nadeem.vawda@gmail.com>2011-07-31 13:01:11 (GMT)
commit9e2e99097cee234a3be025b968fb7ffff0f05f3e (patch)
tree7b8c1f3d88981a75afdb66b7992555df45be4237 /setup.py
parent4fbff6c631ab134846334607602a8b0f55a23333 (diff)
downloadcpython-9e2e99097cee234a3be025b968fb7ffff0f05f3e.zip
cpython-9e2e99097cee234a3be025b968fb7ffff0f05f3e.tar.gz
cpython-9e2e99097cee234a3be025b968fb7ffff0f05f3e.tar.bz2
Fix build error in _curses module when not using libncursesw.
Code extracted from Victor Stinner's patch for issue #12567.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 2426aad..968670c 100644
--- a/setup.py
+++ b/setup.py
@@ -1161,6 +1161,10 @@ class PyBuildExt(build_ext):
else:
missing.extend(['nis', 'resource', 'termios'])
+ curses_defines = []
+ if curses_library == 'ncursesw':
+ curses_defines.append(('HAVE_NCURSESW', '1'))
+
# Curses support, requiring the System V version of curses, often
# provided by the ncurses library.
panel_library = 'panel'
@@ -1171,6 +1175,7 @@ class PyBuildExt(build_ext):
panel_library = 'panelw'
curses_libs = [curses_library]
exts.append( Extension('_curses', ['_cursesmodule.c'],
+ define_macros=curses_defines,
libraries = curses_libs) )
elif curses_library == 'curses' and platform != 'darwin':
# OSX has an old Berkeley curses, not good enough for
@@ -1183,6 +1188,7 @@ class PyBuildExt(build_ext):
curses_libs = ['curses']
exts.append( Extension('_curses', ['_cursesmodule.c'],
+ define_macros=curses_defines,
libraries = curses_libs) )
else:
missing.append('_curses')