From c5276969008176be7fc03f1ab5c9a3e510d34d75 Mon Sep 17 00:00:00 2001 From: Michael Osipov Date: Wed, 8 May 2019 09:27:52 +0200 Subject: [PATCH] bpo-36849: Improve libcurses detection on HP-UX libcurses on HP-UX is a symlink to libxcurses. Handle that properly in setup.py. --- .../next/Build/2019-05-08-09-27-11.bpo-36849.M4hBa_.rst | 1 + setup.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 Misc/NEWS.d/next/Build/2019-05-08-09-27-11.bpo-36849.M4hBa_.rst 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')):