Closed
Description
Bug summary
mplsetup.cfg
isn't being parsed correctly, leading to an invalid matplotlibrc
being installed.
Code for reproduction
$ wget https://files.pythonhosted.org/packages/source/m/matplotlib/matplotlib-3.5.0.tar.gz
$ tar xvzf matplotlib-3.5.0.tar.gz
$ cd matplotlib-3.5.0
$ cat > mplsetup.cfg
[rc_options]
backend=macosx
$ python setup.py install
Actual outcome
The matplotlibrc
that gets installed contains:
#backend: macosx#webagg.port: 8988
Expected outcome
The matplotlibrc
should instead contain:
backend: macosx
#webagg.port 8988
Additional information
When I try to import this installation, I see:
import matplotlib.pyplot as plt
../.spack/.spack-env/view/lib/python3.8/site-packages/matplotlib/__init__.py:895: in <module>
defaultParams = rcsetup.defaultParams = {
../.spack/.spack-env/view/lib/python3.8/site-packages/matplotlib/__init__.py:898: in <dictcomp>
rcParamsDefault[key]),
../.spack/.spack-env/view/lib/python3.8/site-packages/matplotlib/__init__.py:674: in __getitem__
return dict.__getitem__(self, key)
KeyError: 'webagg.port'
Operating system
macOS
Matplotlib Version
3.5.0
Matplotlib Backend
macosx
Python version
3.8.12
Jupyter version
N/A
Installation
from source (.tar.gz)
Metadata
Metadata
Assignees
Labels
No labels