Skip to content

Commit

Permalink
Fix linking for python with external ncurses (spack#45803)
Browse files Browse the repository at this point in the history
Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
  • Loading branch information
s-sajid-ali and adamjstewart authored Aug 20, 2024
1 parent da079ed commit 9d0b9f0
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions var/spack/repos/builtin/packages/python/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,10 +641,11 @@ def configure_args(self):
else:
config_args.append("--without-system-expat")

if "+ctypes" in spec:
config_args.append("--with-system-ffi")
else:
config_args.append("--without-system-ffi")
if self.version < Version("3.12.0"):
if "+ctypes" in spec:
config_args.append("--with-system-ffi")
else:
config_args.append("--without-system-ffi")

if "+tkinter" in spec:
config_args.extend(
Expand All @@ -668,6 +669,9 @@ def configure_args(self):
if 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

def configure(self, spec, prefix):
Expand Down

0 comments on commit 9d0b9f0

Please sign in to comment.