mirror of https://github.com/python/cpython
1. on OS X, there is no separate /usr/lib/libcursesw nor libpanelw 2. _XOPEN_SOURCE_EXTENDED must be enabled for _curses build
This commit is contained in:
parent
fd8a838d58
commit
69192238ba
|
@ -165,6 +165,8 @@ Tests
|
||||||
Build
|
Build
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
- Issue #14225: Fix Unicode support for curses (#12567) on OS X
|
||||||
|
|
||||||
- Issue #14928: Fix importlib bootstrap issues by using a custom executable
|
- Issue #14928: Fix importlib bootstrap issues by using a custom executable
|
||||||
(Modules/_freeze_importlib) to build Python/importlib.h.
|
(Modules/_freeze_importlib) to build Python/importlib.h.
|
||||||
|
|
||||||
|
|
13
setup.py
13
setup.py
|
@ -1185,6 +1185,18 @@ class PyBuildExt(build_ext):
|
||||||
# Bug 1464056: If _curses.so links with ncursesw,
|
# Bug 1464056: If _curses.so links with ncursesw,
|
||||||
# _curses_panel.so must link with panelw.
|
# _curses_panel.so must link with panelw.
|
||||||
panel_library = 'panelw'
|
panel_library = 'panelw'
|
||||||
|
if platform == 'darwin':
|
||||||
|
# On OS X, there is no separate /usr/lib/libncursesw nor
|
||||||
|
# libpanelw. If we are here, we found a locally-supplied
|
||||||
|
# version of libncursesw. There should be also be a
|
||||||
|
# libpanelw. _XOPEN_SOURCE defines are usually excluded
|
||||||
|
# for OS X but we need _XOPEN_SOURCE_EXTENDED here for
|
||||||
|
# ncurses wide char support
|
||||||
|
curses_defines.append(('_XOPEN_SOURCE_EXTENDED', '1'))
|
||||||
|
elif platform == 'darwin' and curses_library == 'ncurses':
|
||||||
|
# Building with the system-suppied combined libncurses/libpanel
|
||||||
|
curses_defines.append(('HAVE_NCURSESW', '1'))
|
||||||
|
curses_defines.append(('_XOPEN_SOURCE_EXTENDED', '1'))
|
||||||
|
|
||||||
if curses_library.startswith('ncurses'):
|
if curses_library.startswith('ncurses'):
|
||||||
curses_libs = [curses_library]
|
curses_libs = [curses_library]
|
||||||
|
@ -1213,6 +1225,7 @@ class PyBuildExt(build_ext):
|
||||||
self.compiler.find_library_file(lib_dirs, panel_library)):
|
self.compiler.find_library_file(lib_dirs, panel_library)):
|
||||||
exts.append( Extension('_curses_panel', ['_curses_panel.c'],
|
exts.append( Extension('_curses_panel', ['_curses_panel.c'],
|
||||||
include_dirs=curses_includes,
|
include_dirs=curses_includes,
|
||||||
|
define_macros=curses_defines,
|
||||||
libraries = [panel_library] + curses_libs) )
|
libraries = [panel_library] + curses_libs) )
|
||||||
else:
|
else:
|
||||||
missing.append('_curses_panel')
|
missing.append('_curses_panel')
|
||||||
|
|
Loading…
Reference in New Issue