Skip to content

Commit 9da439d

Browse files
committed
FIX: put newline in matplotlibrc when setting default backend
Closes #21660
1 parent 4a44cb2 commit 9da439d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.github/workflows/tests.yml

+7
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,13 @@ jobs:
225225
fi
226226
fi
227227
228+
cat <<EOT >> mplsetup.cfg
229+
[rc_options]
230+
##backend=Agg
231+
EOT
232+
233+
cat mplsetup.cfg
234+
228235
# All dependencies must have been pre-installed, so that the minver
229236
# constraints are held.
230237
python -m pip install --no-deps -e .

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def update_matplotlibrc(path):
205205
idx for idx, line in enumerate(template_lines)
206206
if "#backend:" in line]
207207
template_lines[backend_line_idx] = (
208-
"#backend: {}".format(setupext.options["backend"])
208+
"#backend: {}\n".format(setupext.options["backend"])
209209
if setupext.options["backend"]
210210
else "##backend: Agg")
211211
path.write_text("".join(template_lines))

0 commit comments

Comments
 (0)