|
|
1b16bcd |
From a035d73964343cbba0daad79b9349153a51af56a Mon Sep 17 00:00:00 2001
|
|
|
c9345fa |
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
|
|
c9345fa |
Date: Wed, 27 Sep 2017 19:35:59 -0400
|
|
|
acd2786 |
Subject: [PATCH 1/5] matplotlibrc path search fix
|
|
|
c9345fa |
|
|
|
c9345fa |
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
|
|
c9345fa |
---
|
|
|
ca0fc90 |
lib/matplotlib/__init__.py | 5 ++++-
|
|
|
ca0fc90 |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
c9345fa |
|
|
|
c9345fa |
diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py
|
|
|
1b16bcd |
index 353406832c..26dd9372e1 100644
|
|
|
c9345fa |
--- a/lib/matplotlib/__init__.py
|
|
|
c9345fa |
+++ b/lib/matplotlib/__init__.py
|
|
|
acd2786 |
@@ -582,7 +582,8 @@ def get_cachedir():
|
|
|
ca0fc90 |
@_logged_cached('matplotlib data path: %s')
|
|
|
ca0fc90 |
def get_data_path():
|
|
|
ca0fc90 |
"""Return the path to Matplotlib data."""
|
|
|
ca0fc90 |
- return str(Path(__file__).with_name("mpl-data"))
|
|
|
58b78d7 |
+ return str(Path(__file__).parent.parent.parent.parent.parent /
|
|
|
58b78d7 |
+ 'share/matplotlib/mpl-data')
|
|
|
e6f3591 |
|
|
|
1dcb7af |
|
|
|
ca0fc90 |
def matplotlib_fname():
|
|
|
acd2786 |
@@ -602,6 +603,7 @@ def matplotlib_fname():
|
|
|
9046bbb |
is not defined)
|
|
|
9046bbb |
- On other platforms,
|
|
|
e6f3591 |
- ``$HOME/.matplotlib/matplotlibrc`` if ``$HOME`` is defined
|
|
|
037e6ae |
+ - ``/etc/matplotlibrc``
|
|
|
037e6ae |
- Lastly, it looks in ``$MATPLOTLIBDATA/matplotlibrc``, which should always
|
|
|
037e6ae |
exist.
|
|
|
b11ac26 |
"""
|
|
|
acd2786 |
@@ -620,6 +622,7 @@ def matplotlib_fname():
|
|
|
5ff9cbe |
yield matplotlibrc
|
|
|
5ff9cbe |
yield os.path.join(matplotlibrc, 'matplotlibrc')
|
|
|
1dcb7af |
yield os.path.join(get_configdir(), 'matplotlibrc')
|
|
|
5ff9cbe |
+ yield '/etc/matplotlibrc'
|
|
|
ca0fc90 |
yield os.path.join(get_data_path(), 'matplotlibrc')
|
|
|
12e8a62 |
|
|
|
5ff9cbe |
for fname in gen_candidates():
|
|
|
c9345fa |
--
|
|
|
545cd05 |
2.41.0
|
|
|
c9345fa |
|