[3.13] gh-113565: Improve and harden detection of curses dependencies (GH-119816)#121202
Merged
erlend-aasland merged 1 commit intopython:3.13from Jul 1, 2024
Merged
Conversation
…ythonGH-119816) 1. Use pkg-config to check for ncursesw/panelw. If that fails, use pkg-config to check for ncurses/panel. 2. Regardless of pkg-config output, search for curses/panel headers, so we're sure we have all defines in pyconfig.h. 3. Regardless of pkg-config output, check if libncurses or libncursesw contains the 'initscr' symbol; if it does _and_ pkg-config failed earlier, add the resulting -llib linker option to CURSES_LIBS. Ditto for 'update_panels' and PANEL_LIBS. 4. Wrap the rest of the checks with WITH_SAVE_ENV and make sure we're using updated LIBS and CPPFLAGS for those. Add the PY_CHECK_CURSES convenience macro. (cherry picked from commit f80376b) Co-authored-by: Erlend E. Aasland <erlend@python.org>
This was referenced Jul 1, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pkg-config to check for ncurses/panel.
we're sure we have all defines in pyconfig.h.
contains the 'initscr' symbol; if it does and pkg-config failed
earlier, add the resulting -llib linker option to CURSES_LIBS.
Ditto for 'update_panels' and PANEL_LIBS.
using updated LIBS and CPPFLAGS for those.
Add the PY_CHECK_CURSES convenience macro.
(cherry picked from commit f80376b)
Co-authored-by: Erlend E. Aasland erlend@python.org