[3.12] gh-113565: Improve and harden detection of curses dependencies (#119816)#121222
Closed
erlend-aasland wants to merge 1 commit intopython:3.12from
Closed
[3.12] gh-113565: Improve and harden detection of curses dependencies (#119816)#121222erlend-aasland wants to merge 1 commit intopython:3.12from
erlend-aasland wants to merge 1 commit intopython:3.12from
Conversation
…encies (python#119816) (cherry picked from commit f80376b) 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.
This was referenced Jul 1, 2024
Contributor
Author
|
Marked as DO-NOT-MERGE and left to @Yhg1s to decide. See #119816 (comment). |
Contributor
Author
|
See also the 3.12 bug report: |
Member
|
It's difficult, but I think this is too invasive for 3.12. It's too easy for this to break other systems doing automated/scripted builds, both because of the autoconf changes and the differences in which defines are used. We don't want to play use-case-whackamole where we keep breaking one system in our attempts to fix another. |
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.
(cherry picked from commit f80376b)
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.