2014-01-28 16:50:22 +00:00
|
|
|
Description: Fixes the path to search for matplotlibrc file
|
|
|
|
Forwarded: not-needed
|
|
|
|
Author: Sandro Tosi <morph@debian.org>
|
|
|
|
|
|
|
|
--- a/lib/matplotlib/__init__.py
|
|
|
|
+++ b/lib/matplotlib/__init__.py
|
2015-02-25 03:17:01 +00:00
|
|
|
@@ -658,10 +658,12 @@ def _get_data_path():
|
2014-01-28 16:50:22 +00:00
|
|
|
raise RuntimeError('Path in environment MATPLOTLIBDATA not a directory')
|
|
|
|
return path
|
|
|
|
|
|
|
|
- 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
|
2015-02-25 03:17:01 +00:00
|
|
|
@@ -786,7 +788,7 @@ def matplotlib_fname():
|
|
|
|
home, '.matplotlib', 'matplotlibrc')
|
2014-01-28 16:50:22 +00:00
|
|
|
return fname
|
|
|
|
|
|
|
|
- path = get_data_path() # guaranteed to exist or raise
|
|
|
|
+ path = '/etc' # guaranteed to exist or raise
|
|
|
|
fname = os.path.join(path, 'matplotlibrc')
|
|
|
|
if not os.path.exists(fname):
|
|
|
|
warnings.warn('Could not find matplotlibrc; using defaults')
|