diff --git a/Misc/NEWS.d/next/Build/2019-05-08-09-27-11.bpo-36849.M4hBa_.rst b/Misc/NEWS.d/next/Build/2019-05-08-09-27-11.bpo-36849.M4hBa_.rst new file mode 100644 index 00000000000000..e57acbeb381f28 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2019-05-08-09-27-11.bpo-36849.M4hBa_.rst @@ -0,0 +1 @@ +Improve libcurses detection on HP-UX diff --git a/setup.py b/setup.py index 01a503dcbbf0b0..e7df3df12005cf 100644 --- a/setup.py +++ b/setup.py @@ -884,7 +884,7 @@ def detect_readline_curses(self): for ln in fp: if 'curses' in ln: readline_termcap_library = re.sub( - r'.*lib(n?cursesw?)\.so.*', r'\1', ln + r'.*lib([nx]?cursesw?)\.so.*', r'\1', ln ).rstrip() break # termcap interface split out from ncurses @@ -980,7 +980,7 @@ def detect_readline_curses(self): include_dirs=curses_includes, define_macros=curses_defines, libraries=curses_libs)) - elif curses_library == 'curses' and not MACOS: + elif curses_library in ['curses', 'xcurses'] and not MACOS: # OSX has an old Berkeley curses, not good enough for # the _curses module. if (self.compiler.find_library_file(self.lib_dirs, 'terminfo')):