2023-02-27 22:29:17 -05:00
|
|
|
From ddfa1c59d9304eed3a70abcc98c6e1786ce3d751 Mon Sep 17 00:00:00 2001
|
2017-10-15 18:16:56 -04:00
|
|
|
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
|
|
|
Date: Wed, 27 Sep 2017 19:35:59 -0400
|
2023-02-27 22:29:17 -05:00
|
|
|
Subject: [PATCH 1/7] matplotlibrc path search fix
|
2017-10-15 18:16:56 -04:00
|
|
|
|
|
|
|
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
|
|
|
---
|
2021-02-19 05:46:28 -05:00
|
|
|
lib/matplotlib/__init__.py | 5 ++++-
|
|
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
2017-10-15 18:16:56 -04:00
|
|
|
|
|
|
|
diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py
|
2023-02-27 22:29:17 -05:00
|
|
|
index b279c46516..27de76f0c4 100644
|
2017-10-15 18:16:56 -04:00
|
|
|
--- a/lib/matplotlib/__init__.py
|
|
|
|
+++ b/lib/matplotlib/__init__.py
|
2023-02-27 22:29:17 -05:00
|
|
|
@@ -566,7 +566,8 @@ def get_cachedir():
|
2021-02-19 05:46:28 -05: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 16:36:20 -04:00
|
|
|
+ return str(Path(__file__).parent.parent.parent.parent.parent /
|
|
|
|
+ 'share/matplotlib/mpl-data')
|
2020-03-03 23:05:13 -05:00
|
|
|
|
2018-08-17 17:37:11 -04:00
|
|
|
|
2021-02-19 05:46:28 -05:00
|
|
|
def matplotlib_fname():
|
2023-02-27 22:29:17 -05:00
|
|
|
@@ -586,6 +587,7 @@ def matplotlib_fname():
|
2019-05-31 01:44:54 -04:00
|
|
|
is not defined)
|
|
|
|
- On other platforms,
|
2020-03-03 23:05:13 -05:00
|
|
|
- ``$HOME/.matplotlib/matplotlibrc`` if ``$HOME`` is defined
|
2020-06-29 20:38:52 -04:00
|
|
|
+ - ``/etc/matplotlibrc``
|
|
|
|
- Lastly, it looks in ``$MATPLOTLIBDATA/matplotlibrc``, which should always
|
|
|
|
exist.
|
2018-03-31 03:28:44 -04:00
|
|
|
"""
|
2023-02-27 22:29:17 -05:00
|
|
|
@@ -604,6 +606,7 @@ def matplotlib_fname():
|
2017-09-27 01:29:13 -04:00
|
|
|
yield matplotlibrc
|
|
|
|
yield os.path.join(matplotlibrc, 'matplotlibrc')
|
2018-08-17 17:37:11 -04:00
|
|
|
yield os.path.join(get_configdir(), 'matplotlibrc')
|
2017-09-27 01:29:13 -04:00
|
|
|
+ yield '/etc/matplotlibrc'
|
2021-02-19 05:46:28 -05:00
|
|
|
yield os.path.join(get_data_path(), 'matplotlibrc')
|
2014-01-28 14:50:22 -02:00
|
|
|
|
2017-09-27 01:29:13 -04:00
|
|
|
for fname in gen_candidates():
|
2017-10-15 18:16:56 -04:00
|
|
|
--
|
2023-02-27 22:29:17 -05:00
|
|
|
2.39.2
|
2017-10-15 18:16:56 -04:00
|
|
|
|