Alex Hedges 49c31c7d9d Install ncurses from Homebrew, if available
XCode Command Line Tools 15.0 was recently released, and it contains a
broken version of ncurses 6.0. Some uses of Python's `curses` module
will segfault when compiled with it. The solution is to switch to using
the version of ncurses from Homebrew, which is currently 6.4. Support
for ncurses 6 was added to Python 3.7 and was backported to 3.6 and 2.7,
so this change should not break any recently supported Python versions.

I tested this commit with Python 3.12, 3.11, and 2.7, and all tests in
the `test.test_curses` module passed without issue.

See https://github.com/python/cpython/issues/109617 and
https://github.com/python/cpython/issues/69906 for more information.
2023-10-05 14:46:25 -04:00
..