44 lines
1.5 KiB
Diff
44 lines
1.5 KiB
Diff
From 595f7e2f1c1349d1015f13a00da33e08d02d6640 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 1/3] 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 ba9cd6c90c..bc800e1322 100644
|
|
--- a/lib/matplotlib/__init__.py
|
|
+++ b/lib/matplotlib/__init__.py
|
|
@@ -524,7 +524,8 @@ def get_cachedir():
|
|
@_logged_cached('matplotlib data path: %s')
|
|
def get_data_path():
|
|
"""Return the path to Matplotlib data."""
|
|
- return str(Path(__file__).with_name("mpl-data"))
|
|
+ return str(Path(__file__).parent.parent.parent.parent.parent /
|
|
+ 'share/matplotlib/mpl-data')
|
|
|
|
|
|
def matplotlib_fname():
|
|
@@ -544,6 +545,7 @@ def matplotlib_fname():
|
|
is not defined)
|
|
- On other platforms,
|
|
- ``$HOME/.matplotlib/matplotlibrc`` if ``$HOME`` is defined
|
|
+ - ``/etc/matplotlibrc``
|
|
- Lastly, it looks in ``$MATPLOTLIBDATA/matplotlibrc``, which should always
|
|
exist.
|
|
"""
|
|
@@ -562,6 +564,7 @@ def matplotlib_fname():
|
|
yield matplotlibrc
|
|
yield os.path.join(matplotlibrc, 'matplotlibrc')
|
|
yield os.path.join(get_configdir(), 'matplotlibrc')
|
|
+ yield '/etc/matplotlibrc'
|
|
yield os.path.join(get_data_path(), 'matplotlibrc')
|
|
|
|
for fname in gen_candidates():
|
|
--
|
|
2.35.1
|
|
|