Skip to content

Commit

Permalink
bpo-36849: Improve libcurses detection on HP-UX
Browse files Browse the repository at this point in the history
libcurses on HP-UX is a symlink to libxcurses. Handle that properly in setup.py.
  • Loading branch information
michael-o committed Sep 11, 2024
1 parent c49e0e0 commit b5ef0a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improve libcurses detection on HP-UX
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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')):
Expand Down

0 comments on commit b5ef0a9

Please sign in to comment.