Repository navigation
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"
|
@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