cpython: 2035c5ad4239 (original) (raw)
Mercurial > cpython
changeset 77529:2035c5ad4239
Issue #14225: Fix Unicode support for curses (#12567) on OS X: 1. on OS X, there is no separate /usr/lib/libcursesw nor libpanelw 2. _XOPEN_SOURCE_EXTENDED must be enabled for _curses build [#14225]
Ned Deily nad@acm.org | |
---|---|
date | Wed, 20 Jun 2012 23:47:14 -0700 |
parents | dd4f7d5c51c7 |
children | d8244d4dbe37 |
files | Misc/NEWS setup.py |
diffstat | 2 files changed, 15 insertions(+), 0 deletions(-)[+] [-] Misc/NEWS 2 setup.py 13 |
line wrap: on
line diff
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -165,6 +165,8 @@ Tests Build ----- +- Issue #14225: Fix Unicode support for curses (#12567) on OS X +
- Issue #14928: Fix importlib bootstrap issues by using a custom executable (Modules/_freeze_importlib) to build Python/importlib.h.
--- a/setup.py +++ b/setup.py @@ -1185,6 +1185,18 @@ class PyBuildExt(build_ext): # Bug 1464056: If _curses.so links with ncursesw, # _curses_panel.so must link with panelw. panel_library = 'panelw'
if platform == 'darwin':[](#l2.7)
# On OS X, there is no separate /usr/lib/libncursesw nor[](#l2.8)
# libpanelw. If we are here, we found a locally-supplied[](#l2.9)
# version of libncursesw. There should be also be a[](#l2.10)
# libpanelw. _XOPEN_SOURCE defines are usually excluded[](#l2.11)
# for OS X but we need _XOPEN_SOURCE_EXTENDED here for[](#l2.12)
# ncurses wide char support[](#l2.13)
curses_defines.append(('_XOPEN_SOURCE_EXTENDED', '1'))[](#l2.14)
elif platform == 'darwin' and curses_library == 'ncurses':[](#l2.15)
# Building with the system-suppied combined libncurses/libpanel[](#l2.16)
curses_defines.append(('HAVE_NCURSESW', '1'))[](#l2.17)
curses_defines.append(('_XOPEN_SOURCE_EXTENDED', '1'))[](#l2.18)
if curses_library.startswith('ncurses'): curses_libs = [curses_library] @@ -1213,6 +1225,7 @@ class PyBuildExt(build_ext): self.compiler.find_library_file(lib_dirs, panel_library)): exts.append( Extension('_curses_panel', ['_curses_panel.c'], include_dirs=curses_includes,
define_macros=curses_defines,[](#l2.26) libraries = [panel_library] + curses_libs) )[](#l2.27) else:[](#l2.28) missing.append('_curses_panel')[](#l2.29)