Skip to content

Commit aa35b00

Browse files
author
Victor Stinner
committed
cleanup setup.py for curses options
1 parent 5d7c9ab commit aa35b00

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

setup.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,20 +1166,19 @@ class db_found(Exception): pass
11661166
else:
11671167
missing.extend(['nis', 'resource', 'termios'])
11681168

1169+
# Curses support, requiring the System V version of curses, often
1170+
# provided by the ncurses library.
11691171
curses_defines = []
1172+
curses_includes = []
1173+
panel_library = 'panel'
11701174
if curses_library == 'ncursesw':
11711175
curses_defines.append(('HAVE_NCURSESW', '1'))
1176+
curses_includes.append('/usr/include/ncursesw')
1177+
# Bug 1464056: If _curses.so links with ncursesw,
1178+
# _curses_panel.so must link with panelw.
1179+
panel_library = 'panelw'
11721180

1173-
# Curses support, requiring the System V version of curses, often
1174-
# provided by the ncurses library.
1175-
panel_library = 'panel'
1176-
curses_includes = []
11771181
if curses_library.startswith('ncurses'):
1178-
if curses_library == 'ncursesw':
1179-
# Bug 1464056: If _curses.so links with ncursesw,
1180-
# _curses_panel.so must link with panelw.
1181-
panel_library = 'panelw'
1182-
curses_includes = ['/usr/include/ncursesw']
11831182
curses_libs = [curses_library]
11841183
exts.append( Extension('_curses', ['_cursesmodule.c'],
11851184
include_dirs=curses_includes,

0 commit comments

Comments
 (0)