-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
pythonPackages.matplotlib: fix headless detection #124439
Conversation
Result of 57 packages marked as broken and skipped:
3 packages failed to build:363 packages skipped due to time constraints:
164 packages built successfully:
6 suggestions:
Note that build failures may predate this PR, and could be nondeterministic or hardware dependent. Result of 83 packages marked as broken and skipped:
4 packages failed to build:278 packages skipped due to time constraints:
157 packages built successfully:
6 suggestions:
Note that build failures may predate this PR, and could be nondeterministic or hardware dependent. |
We probably should rebase this against staging. |
This just bit me. The release 21.05 has this problem. It should be backported to release 21.05. |
The default backend is chosen based on the content of the $DISPLAY variable *and* a successfull call to libX11, loaded via dlopen(). The test fails because dlopen looks in /usr/lib and /lib, so matplotlib falls back to a headless backend. To reproduce try running: $ nix-shell -I nixpkgs=$PWD -p \ 'python3.withPackages (p: [ p.matplotlib ])' --run python >>> import matplotlib.pyplot as plt >>> assert plt.get_backend() == "TkAgg"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@GrahamcOfBorg build python3Packages.matplotlib |
How to port this to 21.05? #122042 |
Motivation for this change
The default backend is chosen based on the content of the $DISPLAY
variable and a successfull call to libX11, loaded via dlopen().
The test fails because dlopen looks in /usr/lib and /lib, so matplotlib
falls back to a headless backend.
To reproduce try running:
Things done