Issue 36979: ncurses extension uses wrong include path

This is similar to: https://bugs.python.org/issue28190

Not cross-compiling, but using a different ncurses version than is provided under /usr/include/ncursesw

Specifying CPPFLAGS to have "-I/path/to/ncurses/include" does not override the "/usr/include/ncursesw" in setup.py

        if curses_library == 'ncursesw':
            curses_defines.append(('HAVE_NCURSESW', '1'))
            if not cross_compiling:
                curses_includes.append('/usr/include/ncursesw')

Python 2.7.x does not have this issue, but 3.6.x and 3.7.x do.  2 and 3 have different ways of setting up the include path for curses when building the extension.

In my case, removing the curses_include.append from setup.py results in a working extension.

It probably makes sense that Extension(include_dirs=) take priority over Python build CPPFLAGS, setup.py may need to be more cautious about adding the ncurses include path.

Only tested in 2.7, 3.6, 3.7.