2022-05-04 23:14:19 +00:00
|
|
|
From 595f7e2f1c1349d1015f13a00da33e08d02d6640 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
|
2022-05-04 23:14:19 +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>
|
|
|
|
---
|
2021-02-19 10:46:28 +00:00
|
|
|
lib/matplotlib/__init__.py | 5 ++++-
|
|
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
2017-10-15 22:16:56 +00:00
|
|
|
|
|
|
|
diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py
|
2021-10-02 08:57:29 +00:00
|
|
|
index ba9cd6c90c..bc800e1322 100644
|
2017-10-15 22:16:56 +00:00
|
|
|
--- a/lib/matplotlib/__init__.py
|
|
|
|
+++ b/lib/matplotlib/__init__.py
|
2021-08-24 08:09:03 +00:00
|
|
|
@@ -524,7 +524,8 @@ def get_cachedir():
|
2021-02-19 10:46:28 +00:00
|
|
|
@_logged_cached('matplotlib data path: %s')
|
|
|
|
def get_data_path():
|
|
|
|
"""Return the path to Matplotlib data."""
|
|
|
|
- return str(Path(__file__).with_name("mpl-data"))
|
2021-08-25 20:36:20 +00:00
|
|
|
+ return str(Path(__file__).parent.parent.parent.parent.parent /
|
|
|
|
+ 'share/matplotlib/mpl-data')
|
2020-03-04 04:05:13 +00:00
|
|
|
|
2018-08-17 21:37:11 +00:00
|
|
|
|
2021-02-19 10:46:28 +00:00
|
|
|
def matplotlib_fname():
|
2021-08-24 08:09:03 +00:00
|
|
|
@@ -544,6 +545,7 @@ def matplotlib_fname():
|
2019-05-31 05:44:54 +00:00
|
|
|
is not defined)
|
|
|
|
- On other platforms,
|
2020-03-04 04:05:13 +00:00
|
|
|
- ``$HOME/.matplotlib/matplotlibrc`` if ``$HOME`` is defined
|
2020-06-30 00:38:52 +00:00
|
|
|
+ - ``/etc/matplotlibrc``
|
|
|
|
- Lastly, it looks in ``$MATPLOTLIBDATA/matplotlibrc``, which should always
|
|
|
|
exist.
|
2018-03-31 07:28:44 +00:00
|
|
|
"""
|
2021-08-24 08:09:03 +00:00
|
|
|
@@ -562,6 +564,7 @@ def matplotlib_fname():
|
2017-09-27 05:29:13 +00:00
|
|
|
yield matplotlibrc
|
|
|
|
yield os.path.join(matplotlibrc, 'matplotlibrc')
|
2018-08-17 21:37:11 +00:00
|
|
|
yield os.path.join(get_configdir(), 'matplotlibrc')
|
2017-09-27 05:29:13 +00:00
|
|
|
+ yield '/etc/matplotlibrc'
|
2021-02-19 10:46:28 +00:00
|
|
|
yield os.path.join(get_data_path(), 'matplotlibrc')
|
2014-01-28 16:50:22 +00:00
|
|
|
|
2017-09-27 05:29:13 +00:00
|
|
|
for fname in gen_candidates():
|
2017-10-15 22:16:56 +00:00
|
|
|
--
|
2022-05-04 23:14:19 +00:00
|
|
|
2.35.1
|
2017-10-15 22:16:56 +00:00
|
|
|
|