NetBSD's curses headers have different include guards than ncurses. Also, the NetBSD curses library has been improved and some workaround are no longer necessary. Diff against hg attached.
Thanks for your reply! I've checked: keypad in NetBSD curses was fixed in 2009. All supported NetBSD release (5.x and 6.x) have the fix. nodelay and keyname were fixed even earlier, in 2003. So this is no problem for older NetBSD releases.
Thanks for looking at this. I looked at the patch again, and I can't make sense of the py_curses.h part either - I've removed it from pkgsrc with a request for information if it's still needed. Btw, thanks for working on NetBSD curses support in Python. You should really try out on a NetBSD 8 (or -current) snapshot as well, since the curses library was improved for better support especially for python curses in the last year.
I see, the curses library takes a large progress. On NetBSD 8 just two previously tests should be fixed (). Many previously skipped tests are passed now.