Fix linking for python with external ncurses (#45803)

Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
This commit is contained in:
Sajid Ali 2024-08-20 00:09:55 -04:00 committed by GitHub
parent da079ed06f
commit 9d0b9f086f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -641,6 +641,7 @@ def configure_args(self):
else: else:
config_args.append("--without-system-expat") config_args.append("--without-system-expat")
if self.version < Version("3.12.0"):
if "+ctypes" in spec: if "+ctypes" in spec:
config_args.append("--with-system-ffi") config_args.append("--with-system-ffi")
else: else:
@ -668,6 +669,9 @@ def configure_args(self):
if cflags: if cflags:
config_args.append("CFLAGS={0}".format(" ".join(cflags))) config_args.append("CFLAGS={0}".format(" ".join(cflags)))
if self.version >= Version("3.12.0") and sys.platform == "darwin":
config_args.append("CURSES_LIBS={0}".format(spec["ncurses"].libs.link_flags))
return config_args return config_args
def configure(self, spec, prefix): def configure(self, spec, prefix):