This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author yan12125
Recipients Alex.Willmer, doko, masamoto, serhiy.storchaka, vstinner, xdegaye, yan12125
Date 2016-12-09.13:44:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1481291095.75.0.0505975218545.issue28190@psf.upfronthosting.co.za>
In-reply-to
Content
> second issue is that you apparently don't do the changes for term.h

term.h is included only if ncurses is missing and the system (SysV) curses is used, so I didn't change it. See below:

#ifdef __sgi
#include <term.h>
#endif

#ifdef HAVE_NCURSES_H
#include <ncurses.h>
#else
#include <curses.h>
#ifdef HAVE_TERM_H
/* for tigetstr, which is not declared in SysV curses */
#include <term.h>
#endif
#endif


> Third issue is that you can't make these changes for third party extensions

Did you mean 3rd party extensions that include py_curses.h may get broken with this patch? IMO they shouldn't include this as it's CPython's implementation detail and shouldn't be used outside Modules/_cursesmodule.c and Modules/_curses_panel.c

> however the ncursesw installation can be found in <prefix>/include instead

This is what I want to solve at the first place - make _curses compatible with different configurations. In configure.ac, there's a line:

AC_CHECK_HEADERS(curses.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h panel.h ncursesw/panel.h ncurses/panel.h)

> so you apparently can assume that this directory name is fixed *iff* it exists

Did you mean there's no need to check panel.h? I'll try to update the patch.


There's something missing from this patch: if ncurses is built with --enable-reentrant, the library and include paths get an additional 't'. For example, the library name becomes libncursestw.so and includedir becomes $prefix/include/ncursestw. Note that 't' comes before 'w' as ncurses's configure.in handles --enable-widec before --enable-reentrant. I skip such cases as --enable-reentrant is not compatible with Modules/_cursesmodule.c yet (issue25720). I'd like to postpone it until issue25720 is resolved as it does not make sense to detect incompatible header paths.
History
Date User Action Args
2016-12-09 13:44:55yan12125setrecipients: + yan12125, doko, vstinner, xdegaye, serhiy.storchaka, masamoto, Alex.Willmer
2016-12-09 13:44:55yan12125setmessageid: <1481291095.75.0.0505975218545.issue28190@psf.upfronthosting.co.za>
2016-12-09 13:44:55yan12125linkissue28190 messages
2016-12-09 13:44:55yan12125create