summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2016-08-03 12:35:09 -0500
committerAdam J. Stewart <ajstewart426@gmail.com>2016-08-11 10:28:35 -0500
commit8a0824df09dfe5d8ff0b34a35ee93be81fc75380 (patch)
treea04d89967de127ea1eec9a9d4e3f1caca34a6b4a /var
parenta388871083f60d0c35f78ceb4b0a4235458b57cb (diff)
downloadspack-8a0824df09dfe5d8ff0b34a35ee93be81fc75380.tar.gz
spack-8a0824df09dfe5d8ff0b34a35ee93be81fc75380.tar.bz2
spack-8a0824df09dfe5d8ff0b34a35ee93be81fc75380.tar.xz
spack-8a0824df09dfe5d8ff0b34a35ee93be81fc75380.zip
Update matplotlibrc filtering for GUI backends
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/py-matplotlib/package.py18
-rw-r--r--var/spack/repos/builtin/packages/python/package.py2
2 files changed, 10 insertions, 10 deletions
diff --git a/var/spack/repos/builtin/packages/py-matplotlib/package.py b/var/spack/repos/builtin/packages/py-matplotlib/package.py
index e56d162232..7b7239d1f0 100644
--- a/var/spack/repos/builtin/packages/py-matplotlib/package.py
+++ b/var/spack/repos/builtin/packages/py-matplotlib/package.py
@@ -80,19 +80,17 @@ class PyMatplotlib(Package):
setup_py('build')
setup_py('install', '--prefix={0}'.format(prefix))
- if str(self.version) in ['1.4.2', '1.4.3']:
- # hack to fix configuration file
+ if '+gui' in spec:
+ # Set backend in matplotlib configuration file
config_file = None
for p, d, f in os.walk(prefix.lib):
for file in f:
if file.find('matplotlibrc') != -1:
config_file = join_path(p, 'matplotlibrc')
- print config_file
if not config_file:
- raise InstallError('could not find config file')
- filter_file(r'backend : pyside',
- 'backend : Qt4Agg',
- config_file)
- filter_file(r'#backend.qt4 : PyQt4',
- 'backend.qt4 : PySide',
- config_file)
+ raise InstallError('Could not find matplotlibrc')
+
+ kwargs = {'ignore_absent': False, 'backup': False, 'string': False}
+ rc = FileFilter(config_file)
+ rc.filter('^backend.*', 'backend : Qt4Agg', **kwargs)
+ rc.filter('^#backend.qt4.*', 'backend.qt4 : PySide', **kwargs)
diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py
index c4e6754969..57783b0542 100644
--- a/var/spack/repos/builtin/packages/python/package.py
+++ b/var/spack/repos/builtin/packages/python/package.py
@@ -133,6 +133,8 @@ class Python(Package):
# TODO: Once better testing support is integrated, add the following tests
# https://wiki.python.org/moin/TkInter
#
+ # Note: Only works if ForwardX11Trusted is enabled, i.e. `ssh -Y`
+ #
# if '+tk' in spec:
# env['TK_LIBRARY'] = join_path(spec['tk'].prefix.lib,
# 'tk{0}'.format(spec['tk'].version.up_to(2)))