diff options
author | doko@ubuntu.com <doko@ubuntu.com> | 2014-04-17 20:11:19 +0200 |
---|---|---|
committer | doko@ubuntu.com <doko@ubuntu.com> | 2014-04-17 20:11:19 +0200 |
commit | f27ec3e5515115080b270c5530929d365791c2c1 (patch) | |
tree | 3bce992998de0b556efe2103c64cdbb29d7fa25e /setup.py | |
parent | dd967efae997b0cc2a616310835d3c4ca3682fc9 (diff) | |
download | cpython-git-f27ec3e5515115080b270c5530929d365791c2c1.tar.gz |
- Issue #21285: Refactor and fix curses configure check to always search
in a ncursesw directory.
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1339,13 +1339,17 @@ class PyBuildExt(build_ext): # Curses support, requiring the System V version of curses, often # provided by the ncurses library. panel_library = 'panel' + curses_incs = None if curses_library.startswith('ncurses'): if curses_library == 'ncursesw': # Bug 1464056: If _curses.so links with ncursesw, # _curses_panel.so must link with panelw. panel_library = 'panelw' curses_libs = [curses_library] + curses_incs = find_file('curses.h', inc_dirs, + [os.path.join(d, 'ncursesw') for d in inc_dirs]) exts.append( Extension('_curses', ['_cursesmodule.c'], + include_dirs = curses_incs, libraries = curses_libs) ) elif curses_library == 'curses' and host_platform != 'darwin': # OSX has an old Berkeley curses, not good enough for @@ -1366,6 +1370,7 @@ class PyBuildExt(build_ext): if (module_enabled(exts, '_curses') and self.compiler.find_library_file(lib_dirs, panel_library)): exts.append( Extension('_curses_panel', ['_curses_panel.c'], + include_dirs = curses_incs, libraries = [panel_library] + curses_libs) ) else: missing.append('_curses_panel') |