python-matplotlib/0001-matplotlibrc-path-sear...

40 lines
1.4 KiB
Diff
Raw Normal View History

2018-03-31 07:28:44 +00:00
From 69c596604b1dee1b8aeb066907a4543053e375a9 Mon Sep 17 00:00:00 2001
2017-10-15 22:16:56 +00:00
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Wed, 27 Sep 2017 19:35:59 -0400
2018-03-31 07:28:44 +00:00
Subject: [PATCH 1/3] matplotlibrc path search fix
2017-10-15 22:16:56 +00:00
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
2018-03-31 07:28:44 +00:00
index 93397070f..c68b8ca9a 100644
2017-10-15 22:16:56 +00:00
--- a/lib/matplotlib/__init__.py
+++ b/lib/matplotlib/__init__.py
2018-03-31 07:28:44 +00:00
@@ -739,9 +739,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
2018-03-31 07:28:44 +00:00
@@ -836,7 +839,7 @@ def matplotlib_fname():
2017-09-27 05:29:13 +00:00
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'
2017-09-27 05:29:13 +00:00
for fname in gen_candidates():
2018-03-31 07:28:44 +00:00
if os.path.exists(fname):
2017-10-15 22:16:56 +00:00
--
2018-01-21 09:05:53 +00:00
2.14.3
2017-10-15 22:16:56 +00:00