[Python-modules-commits] [matplotlib] 03/10: Fixes the path to search for matplotlibrc file
Sandro Tosi
morph at moszumanska.debian.org
Mon Dec 19 02:30:25 UTC 2016
This is an automated email from the git hooks/post-receive script.
morph pushed a commit to branch experimental
in repository matplotlib.
commit 43ba3eb65614ef1295325515eafb66f33528d947
Author: Sandro Tosi <morph at debian.org>
Date: Thu Oct 8 09:47:11 2015 -0700
Fixes the path to search for matplotlibrc file
Forwarded: not-needed
Patch-Name: 20_matplotlibrc_path_search_fix.patch
---
lib/matplotlib/__init__.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py
index f18b6bd..626ccc3 100644
--- a/lib/matplotlib/__init__.py
+++ b/lib/matplotlib/__init__.py
@@ -709,10 +709,12 @@ def _get_data_path():
return 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
@@ -840,7 +842,7 @@ def matplotlib_fname():
home, '.matplotlib', 'matplotlibrc')
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')
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/matplotlib.git
More information about the Python-modules-commits
mailing list