summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Johnson <glennpj@gmail.com>2016-09-21 06:02:28 -0500
committerTodd Gamblin <tgamblin@llnl.gov>2016-09-21 04:02:28 -0700
commitc1284a9046bc54c34ec400bffa9458f084c0f9da (patch)
tree81f5dd55eccd0ccea70d08a5f2d151c2bc596575
parent851b58248dd12dd23b15075a97b26d301591343b (diff)
downloadspack-c1284a9046bc54c34ec400bffa9458f084c0f9da.tar.gz
spack-c1284a9046bc54c34ec400bffa9458f084c0f9da.tar.bz2
spack-c1284a9046bc54c34ec400bffa9458f084c0f9da.tar.xz
spack-c1284a9046bc54c34ec400bffa9458f084c0f9da.zip
Stop python from linking with system ncurses (#1672)
Python will look to link with libncursesw in preference to libncurses. Since ncurses in spack is built without suffixes there is no libncursesw and python will link to the system libncursesw for _curses.so and _curses_panel.so, as well as libpanelw for _curses_panel.so. This PR introduces a patch that simple removes the check for ncursesw in setup.py and therefore sets `curses_library` to `ncurses`.
-rw-r--r--var/spack/repos/builtin/packages/python/ncurses.patch11
-rw-r--r--var/spack/repos/builtin/packages/python/package.py2
2 files changed, 13 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/python/ncurses.patch b/var/spack/repos/builtin/packages/python/ncurses.patch
new file mode 100644
index 0000000000..9054c03e7b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/python/ncurses.patch
@@ -0,0 +1,11 @@
+--- a/setup.py 2016-08-30 15:39:59.334926574 -0500
++++ b/setup.py 2016-08-30 15:46:57.227946339 -0500
+@@ -745,8 +745,6 @@
+ # use the same library for the readline and curses modules.
+ if 'curses' in readline_termcap_library:
+ curses_library = readline_termcap_library
+- elif self.compiler.find_library_file(lib_dirs, 'ncursesw'):
+- curses_library = 'ncursesw'
+ elif self.compiler.find_library_file(lib_dirs, 'ncurses'):
+ curses_library = 'ncurses'
+ elif self.compiler.find_library_file(lib_dirs, 'curses'):
diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py
index e95bb4ba24..f3380cf75d 100644
--- a/var/spack/repos/builtin/packages/python/package.py
+++ b/var/spack/repos/builtin/packages/python/package.py
@@ -74,6 +74,8 @@ class Python(Package):
depends_on("tk", when="+tk")
depends_on("tcl", when="+tk")
+ patch('ncurses.patch')
+
@when('@2.7,3.4:')
def patch(self):
# NOTE: Python's default installation procedure makes it possible for a