FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-136687: Add ./configure --with-curses to select the curses backend by serhiy-storchaka · Pull Request #153992 · python/cpython · GitHub

Repository navigation

gh-136687: Add ./configure --with-curses to select the curses backend - #153992

Merged
serhiy-storchaka merged 3 commits into
python:mainfrom
serhiy-storchaka:curses-with-curses
Jul 19, 2026
Merged

serhiy-storchaka merged 3 commits into
python:mainfrom
serhiy-storchaka:curses-with-curses

Conversation

Copy link
Copy Markdown
Member

Add --with-curses=ncursesw|ncurses|curses|no, mirroring --with-readline.

The default (auto) keeps the current behaviour: prefer ncursesw, fall back to ncurses. --with-curses=curses links the system's native curses (for example on NetBSD or Solaris), which has no pkg-config file and was previously unreachable; it is built with wide-character support when the library provides it. --without-curses excludes the curses and _curses_panel modules from the build.

This supersedes #136696, which added a boolean --disable-curses: --without-curses covers that request, and the option adds backend selection on top.

…ackend

Add --with-curses=ncursesw|ncurses|curses|no, mirroring --with-readline.
The default (auto) keeps the current behaviour: prefer ncursesw, fall back
to ncurses.  --with-curses=curses links the system's native curses (e.g. on
NetBSD or Solaris), which has no pkg-config file and was previously
unreachable; it is built with wide-character support when the library
provides it.  --without-curses excludes the curses and _curses_panel modules
from the build.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

read-the-docs-community Bot commented Jul 18, 2026 •
edited
Loading

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33651599 | 📁 Comparing 242508f against main (46e950f)

  🔍 Preview build  

6 files changed · ± 6 modified

± Modified

serhiy-storchaka and others added 2 commits July 18, 2026 18:59
The probe declared a wchar_t array whose subscript was mangled by m4
quoting, so it failed to compile and native curses was always detected as
narrow.  Use a wide string literal instead, with no brackets to quote.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ackend

Detect the pkgsrc ncurses panel, which is installed as "gnupanel" (with a
"gnu" prefix) so it does not clash with a system libpanel.  Without this the
panel search falls back to a mismatched system libpanel, and _curses_panel
then operates on _curses windows from a different curses library and crashes.

For the native "curses" backend, probe only the plain <curses.h>/<panel.h>:
a system may also have ncurses headers, and picking those while linking the
native library mixes incompatible declarations (e.g. tparm()) with the
native <term.h>.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
serhiy-storchaka enabled auto-merge (squash) July 19, 2026 05:43
serhiy-storchaka merged commit 3c274d0 into python:main Jul 19, 2026
49 checks passed
serhiy-storchaka deleted the curses-with-curses branch August 27, 2026 12:34
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL