]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Patch #428494: Prefer linking against ncursesw over ncurses library
authorMartin v. Löwis <martin@v.loewis.de>
Sat, 11 Feb 2006 15:55:22 +0000 (15:55 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sat, 11 Feb 2006 15:55:22 +0000 (15:55 +0000)
Misc/NEWS
setup.py

index 4d23a972c0f978194c1dc7e4e46d1db4dba64980..ea6876355accb411fa02fd46836c7cb03457e02f 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -112,6 +112,11 @@ Tools/Demos
 - Fixed a display glitch in Pynche, which could cause the right arrow to
   wiggle over by a pixel.
 
+Build
+-----
+
+- Patch #1428494: Prefer linking against ncursesw over ncurses library.
+
 What's New in Python 2.4.2 final?
 =================================
 
index 4bf05107e123b58d569e341eb8ab2792f6bfdfda..7d874cdd30602afc0d296c1f17265cc9dd3b2209 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -425,6 +425,9 @@ class PyBuildExt(build_ext):
         if self.compiler.find_library_file(lib_dirs, 'readline'):
             readline_libs = ['readline']
             if self.compiler.find_library_file(lib_dirs,
+                                                 'ncursesw'):
+                readline_libs.append('ncursesw')
+            elif self.compiler.find_library_file(lib_dirs,
                                                  'ncurses'):
                 readline_libs.append('ncurses')
             elif self.compiler.find_library_file(lib_dirs, 'curses'):
@@ -678,7 +681,11 @@ class PyBuildExt(build_ext):
 
         # Curses support, requiring the System V version of curses, often
         # provided by the ncurses library.
-        if (self.compiler.find_library_file(lib_dirs, 'ncurses')):
+        if (self.compiler.find_library_file(lib_dirs, 'ncursesw')):
+            curses_libs = ['ncursesw']
+            exts.append( Extension('_curses', ['_cursesmodule.c'],
+                                   libraries = curses_libs) )
+        elif (self.compiler.find_library_file(lib_dirs, 'ncurses')):
             curses_libs = ['ncurses']
             exts.append( Extension('_curses', ['_cursesmodule.c'],
                                    libraries = curses_libs) )