Skip to content

Commit b5ef0a9

Browse files
committed
bpo-36849: Improve libcurses detection on HP-UX
libcurses on HP-UX is a symlink to libxcurses. Handle that properly in setup.py.
1 parent c49e0e0 commit b5ef0a9

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Improve libcurses detection on HP-UX

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@ def detect_readline_curses(self):
884884
for ln in fp:
885885
if 'curses' in ln:
886886
readline_termcap_library = re.sub(
887-
r'.*lib(n?cursesw?)\.so.*', r'\1', ln
887+
r'.*lib([nx]?cursesw?)\.so.*', r'\1', ln
888888
).rstrip()
889889
break
890890
# termcap interface split out from ncurses
@@ -980,7 +980,7 @@ def detect_readline_curses(self):
980980
include_dirs=curses_includes,
981981
define_macros=curses_defines,
982982
libraries=curses_libs))
983-
elif curses_library == 'curses' and not MACOS:
983+
elif curses_library in ['curses', 'xcurses'] and not MACOS:
984984
# OSX has an old Berkeley curses, not good enough for
985985
# the _curses module.
986986
if (self.compiler.find_library_file(self.lib_dirs, 'terminfo')):

0 commit comments

Comments
 (0)