Blob Blame Raw
From 400b97c30de5aa45e48a26c552dc310a3c1cf758 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Wed, 27 Sep 2017 19:35:59 -0400
Subject: [PATCH 7/8] matplotlibrc path search fix

Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
 lib/matplotlib/__init__.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py
index 00488a134..b989bc380 100644
--- a/lib/matplotlib/__init__.py
+++ b/lib/matplotlib/__init__.py
@@ -635,9 +635,12 @@ def _get_data_path():
 
     _file = _decode_filesystem_path(__file__)
     path = os.sep.join([os.path.dirname(_file), 'mpl-data'])
+    path = '/usr/share/matplotlib/mpl-data'
     if os.path.isdir(path):
         return path
 
+    raise RuntimeError('Could not find the matplotlib data files')
+
     # setuptools' namespace_packages may highjack this init file
     # so need to try something known to be in matplotlib, not basemap
     import matplotlib.afm
@@ -731,7 +734,7 @@ def matplotlib_fname():
             yield matplotlibrc
             yield os.path.join(matplotlibrc, 'matplotlibrc')
         yield os.path.join(_get_configdir(), 'matplotlibrc')
-        yield os.path.join(get_data_path(), 'matplotlibrc')
+        yield '/etc/matplotlibrc'
 
     for fname in gen_candidates():
         if os.path.isfile(fname):
-- 
2.13.5