forked from pyinstaller/pyinstaller
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hooks: Fix matplotlib hooks to support matplotlib 3.3.0. (pyinstaller…
…#5006) This alters where matplotlib's ``mpl-data`` folder is put and how it is found at runtime. This is to support matplotlib>=3.3.0 without breaking older versions. Fixes pyinstaller#5004. Previously, the data folder was places in the app's root and a runtime hook injected the environment variable ``MATPLOTLIBDATA`` to point to said folder. This variable was deprecated in ``matplotlib 3.1.0`` and now raises an error in ``matplotlib 3.3.0``. With this commit, hook-matplotlib.py puts the ``mpl-data`` folder where matplotlib is now (almost) hard-coded to expect it to be; which is in the parent folder of wherever ``matplotlib.__file__`` points to. With this move, we no longer need a runtime hook. When I say `almost hard-coded` above, I mean it appears like matplotlib meant to make it flexible but have mangled it as it now raises a ``NameError`` (see issue pyinstaller#5004) which presumably isn't intentional.
- Loading branch information
Showing
4 changed files
with
5 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Remove runtime hook and fix regular hook for matplotlib's data to support ``matplotlib>=3.3.0``, fix deprecation warning on version 3.1<= & <3.3, | ||
and behave normally for versions <3.1. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters