Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hooks: matplotlib: assert that mpl_data_dir is not empty #5629

Merged
merged 2 commits into from Mar 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions PyInstaller/hooks/hook-matplotlib.py
Expand Up @@ -14,6 +14,7 @@

mpl_data_dir = exec_statement(
"import matplotlib; print(matplotlib.get_data_path())")
assert mpl_data_dir, "Failed to determine matplotlib's data directory!"

datas = [
(mpl_data_dir, "matplotlib/mpl-data"),
Expand Down
2 changes: 2 additions & 0 deletions news/5629.hooks.rst
@@ -0,0 +1,2 @@
Prevent ``matplotlib`` hook from collecting current working directory when it
fails to determine the path to matplotlib's data directory.
2 changes: 1 addition & 1 deletion tests/requirements-libraries.txt
Expand Up @@ -17,7 +17,6 @@
#
# - v. 2.2 and above fails.
Django==2.1.8 # pyup: ignore
matplotlib==3.2.2 # pyup: ignore
# - v 21.1.0 fails; earlier versions not tested.
keyring==19.2.0 # pyup: ignore

Expand Down Expand Up @@ -45,6 +44,7 @@ pandas==1.1.5
numpy==1.19.4
scipy==1.5.4
Pillow==8.0.1
matplotlib==3.3.4


# Python versions not supported / supported for older package versions
Expand Down