<!-- Thank you for contributing to Pyodide! All improvements are welcome,
     so don't be afraid to make a PR. -->

<!-- [IMPORTANT] Note on CI failures:
     Currently, we are having issues with selenium-based tests.
     Don't panic if the CI fails on your PR because of timeouts.
     It's probably not your fault. We will investigate :) -->

### Description

<!-- Please explain what your PR is about:
     - reasoning for the change
     - some details of updated code
     - any noteworthy choices to be aware of
	Please refer to any related issues by #<issue_id> -->

Bumping MPL version - it turns out that Hist (which uses boost-histogram) depends on mplhep, which in turn requires matplotlib 3.4+. So I migrated the patches and bumped MPL.

I noticed micropip doesn't seem to respect extras, that is, `await micropip.install("hist[plot]")` doesn't seem to work. (will investigate later)

* Updated matplotlib to 3.5
    * Added fonttools
* Updated yt to 4
    * Added `cmyt` and `unyt`, which I am pretty sure are yt specific. At least by looking at the name. 😆 
    * Also `colorspacious`
    * Also `tdqm`
    * Also `tomli` and `tomli-w` (backported from the next yt release to avoid adding a dead dependency `toml`)

Closes #2088 too. Also 3.5 was the first version to officially support 3.10, I think.
chore: matplotlib 3.5.1, yt 4. <!-- Thank you for contributing to Pyodide! All improvements are welcome,
     so don't be afraid to make a PR. -->

<!-- [IMPORTANT] Note on CI failures:
     Currently, we are having issues with selenium-based tests.
     Don't panic if the CI fails on your PR because of timeouts.
     It's probably not your fault. We will investigate :) -->

### Description

<!-- Please explain what your PR is about:
     - reasoning for the change
     - some details of updated code
     - any noteworthy choices to be aware of
	Please refer to any related issues by #<issue_id> -->

Bumping MPL version - it turns out that Hist (which uses boost-histogram) depends on mplhep, which in turn requires matplotlib 3.4+. So I migrated the patches and bumped MPL.

I noticed micropip doesn't seem to respect extras, that is, `await micropip.install("hist[plot]")` doesn't seem to work. (will investigate later)

* Updated matplotlib to 3.5
    * Added fonttools
* Updated yt to 4
    * Added `cmyt` and `unyt`, which I am pretty sure are yt specific. At least by looking at the name. 😆 
    * Also `colorspacious`
    * Also `tdqm`
    * Also `tomli` and `tomli-w` (backported from the next yt release to avoid adding a dead dependency `toml`)

Closes #2088 too. Also 3.5 was the first version to officially support 3.10, I think.
--- a/setup.py	2020-10-22 16:27:16.000000000 +0200
+++ b/setup.py	2020-12-15 08:43:30.000000000 +0100
@@ -557,7 +557,9 @@
 
         if feature.want("zlib"):
             _dbg("Looking for zlib")
-            if _find_include_file(self, "zlib.h"):
+            if "PYODIDE" in os.environ:
+                feature.zlib = "z"
+            elif _find_include_file(self, "zlib.h"):
                 if _find_library_file(self, "z"):
                     feature.zlib = "z"
                 elif sys.platform == "win32" and _find_library_file(self, "zlib"):
@@ -565,7 +567,9 @@
 
         if feature.want("jpeg"):
             _dbg("Looking for jpeg")
-            if _find_include_file(self, "jpeglib.h"):
+            if "PYODIDE" in os.environ:
+                feature.jpeg = "jpeg"
+            elif _find_include_file(self, "jpeglib.h"):
                 if _find_library_file(self, "jpeg"):
                     feature.jpeg = "jpeg"
                 elif sys.platform == "win32" and _find_library_file(self, "libjpeg"):
@@ -631,7 +635,9 @@
 
         if feature.want("freetype"):
             _dbg("Looking for freetype")
-            if _find_library_file(self, "freetype"):
+            if "PYODIDE" in os.environ:
+                feature.freetype = "freetype"
+            elif _find_library_file(self, "freetype"):
                 # look for freetype2 include files
                 freetype_version = 0
                 for subdir in self.compiler.include_dirs:
@@ -704,7 +710,8 @@
         libs = self.add_imaging_libs.split()
         defs = []
         if feature.jpeg:
-            libs.append(feature.jpeg)
+            if "PYODIDE" not in os.environ:
+                libs.append(feature.jpeg)
             defs.append(("HAVE_LIBJPEG", None))
         if feature.jpeg2000:
             libs.append(feature.jpeg2000)

--- a/setup.py	2020-10-22 16:27:16.000000000 +0200
+++ b/setup.py	2020-12-15 08:43:30.000000000 +0100
@@ -557,7 +557,9 @@
 
         if feature.want("zlib"):
             _dbg("Looking for zlib")
-            if _find_include_file(self, "zlib.h"):
+            if "PYODIDE" in os.environ:
+                feature.zlib = "z"
+            elif _find_include_file(self, "zlib.h"):
                 if _find_library_file(self, "z"):
                     feature.zlib = "z"
                 elif sys.platform == "win32" and _find_library_file(self, "zlib"):
@@ -565,7 +567,9 @@
 
         if feature.want("jpeg"):
             _dbg("Looking for jpeg")
-            if _find_include_file(self, "jpeglib.h"):
+            if "PYODIDE" in os.environ:
+                feature.jpeg = "jpeg"
+            elif _find_include_file(self, "jpeglib.h"):
                 if _find_library_file(self, "jpeg"):
                     feature.jpeg = "jpeg"
                 elif sys.platform == "win32" and _find_library_file(self, "libjpeg"):
@@ -631,7 +635,9 @@
 
         if feature.want("freetype"):
             _dbg("Looking for freetype")
-            if _find_library_file(self, "freetype"):
+            if "PYODIDE" in os.environ:
+                feature.freetype = "freetype"
+            elif _find_library_file(self, "freetype"):
                 # look for freetype2 include files
                 freetype_version = 0
                 for subdir in self.compiler.include_dirs:
@@ -704,7 +710,8 @@
         libs = self.add_imaging_libs.split()
         defs = []
         if feature.jpeg:
-            libs.append(feature.jpeg)
+            if "PYODIDE" not in os.environ:
+                libs.append(feature.jpeg)
             defs.append(("HAVE_LIBJPEG", None))
         if feature.jpeg2000:
             libs.append(feature.jpeg2000)
