void-packages/srcpkgs/python-matplotlib/patches/20_matplotlibrc_path_search...

22 lines
646 B
Diff

--- ./lib/matplotlib/__init__.py
+++ ./lib/matplotlib/__init__.py
@@ -663,6 +663,10 @@
if os.path.isdir(path):
return path
+ path = '/usr/share/matplotlib/mpl-data'
+ if os.path.isdir(path):
+ return path
+
raise RuntimeError('Could not find the matplotlib data files')
@@ -732,6 +736,7 @@
yield os.path.join(matplotlibrc, 'matplotlibrc')
yield os.path.join(_get_configdir(), 'matplotlibrc')
yield os.path.join(get_data_path(), 'matplotlibrc')
+ yield os.path.join('/etc', 'matplotlibrc')
for fname in gen_candidates():
if os.path.isfile(fname):