Fix uname to report emscripten version accurately. More investigation into gha failure on #2591.
In Pyodide, font list (see packages/matplotlib/src/fontlist.json)
is manually pushed in the matplotlib's directory (see meta.yaml)
so we teach `font_manager.py` where to find it.

diff --git a/lib/matplotlib/font_manager.py b/lib/matplotlib/font_manager.py
index e8fb0ca322..fa9a6c4ea7 100644
--- a/lib/matplotlib/font_manager.py
+++ b/lib/matplotlib/font_manager.py
@@ -1403,7 +1403,6 @@ def _get_font(filename, hinting_factor, *, _kerning_factor, thread_id):
     return ft2font.FT2Font(
         filename, hinting_factor, _kerning_factor=_kerning_factor)
 
-
 # FT2Font objects cannot be used across fork()s because they reference the same
 # FT_Library object.  While invalidating *all* existing FT2Fonts after a fork
 # would be too complicated to be worth it, the main way FT2Fonts get reused is
@@ -1425,8 +1424,7 @@ def get_font(filename, hinting_factor=None):
 
 
 def _load_fontmanager(*, try_read_cache=True):
-    fm_path = Path(
-        mpl.get_cachedir(), f"fontlist-v{FontManager.__version__}.json")
+    fm_path = Path(__file__).parent.joinpath("fontlist.json")
     if try_read_cache:
         try:
             fm = json_load(fm_path)
-- 
2.35.1


In Pyodide, font list (see packages/matplotlib/src/fontlist.json)
is manually pushed in the matplotlib's directory (see meta.yaml)
so we teach `font_manager.py` where to find it.

diff --git a/lib/matplotlib/font_manager.py b/lib/matplotlib/font_manager.py
index e8fb0ca322..fa9a6c4ea7 100644
--- a/lib/matplotlib/font_manager.py
+++ b/lib/matplotlib/font_manager.py
@@ -1403,7 +1403,6 @@ def _get_font(filename, hinting_factor, *, _kerning_factor, thread_id):
     return ft2font.FT2Font(
         filename, hinting_factor, _kerning_factor=_kerning_factor)
 
-
 # FT2Font objects cannot be used across fork()s because they reference the same
 # FT_Library object.  While invalidating *all* existing FT2Fonts after a fork
 # would be too complicated to be worth it, the main way FT2Fonts get reused is
@@ -1425,8 +1424,7 @@ def get_font(filename, hinting_factor=None):
 
 
 def _load_fontmanager(*, try_read_cache=True):
-    fm_path = Path(
-        mpl.get_cachedir(), f"fontlist-v{FontManager.__version__}.json")
+    fm_path = Path(__file__).parent.joinpath("fontlist.json")
     if try_read_cache:
         try:
             fm = json_load(fm_path)
-- 
2.35.1

