Blame SOURCES/0001-matplotlibrc-path-search-fix.patch

7cd938
From 92b11ded669267100e3c6858578351cad3749cd0 Mon Sep 17 00:00:00 2001
7cd938
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
7cd938
Date: Wed, 27 Sep 2017 19:35:59 -0400
7cd938
Subject: [PATCH 1/3] matplotlibrc path search fix
7cd938
7cd938
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
7cd938
---
7cd938
 lib/matplotlib/__init__.py | 5 ++++-
7cd938
 1 file changed, 4 insertions(+), 1 deletion(-)
7cd938
7cd938
diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py
7cd938
index c3d4aaf62d..ec115cd3f5 100644
7cd938
--- a/lib/matplotlib/__init__.py
7cd938
+++ b/lib/matplotlib/__init__.py
7cd938
@@ -471,7 +471,8 @@ def get_cachedir():
7cd938
 @_logged_cached('matplotlib data path: %s')
7cd938
 def get_data_path():
7cd938
     """Return the path to Matplotlib data."""
7cd938
-    return str(Path(__file__).with_name("mpl-data"))
7cd938
+    return (Path(__file__).parent.parent.parent.parent.parent /
7cd938
+            'share/matplotlib/mpl-data')
7cd938
 
7cd938
 
7cd938
 def matplotlib_fname():
7cd938
@@ -491,6 +492,7 @@ def matplotlib_fname():
7cd938
           is not defined)
7cd938
     - On other platforms,
7cd938
       - ``$HOME/.matplotlib/matplotlibrc`` if ``$HOME`` is defined
7cd938
+    - ``/etc/matplotlibrc``
7cd938
     - Lastly, it looks in ``$MATPLOTLIBDATA/matplotlibrc``, which should always
7cd938
       exist.
7cd938
     """
7cd938
@@ -509,6 +511,7 @@ def matplotlib_fname():
7cd938
             yield matplotlibrc
7cd938
             yield os.path.join(matplotlibrc, 'matplotlibrc')
7cd938
         yield os.path.join(get_configdir(), 'matplotlibrc')
7cd938
+        yield '/etc/matplotlibrc'
7cd938
         yield os.path.join(get_data_path(), 'matplotlibrc')
7cd938
 
7cd938
     for fname in gen_candidates():
7cd938
-- 
7cd938
2.29.2
7cd938