From eed88e3215459c47edf39160d0dd4227929d4009 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Sat, 14 Jul 2018 11:54:14 -0500 Subject: [PATCH 1/2] Use the Agg backend for docs builds This uses a non-interactive Agg matplotlib backend to build docs, which avoids trying to use the default MacOS backend, which can fail in some environments. Closes #21913. --- doc/source/matplotlibrc | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/source/matplotlibrc diff --git a/doc/source/matplotlibrc b/doc/source/matplotlibrc new file mode 100644 index 0000000000000..88a83657331bd --- /dev/null +++ b/doc/source/matplotlibrc @@ -0,0 +1 @@ +backend: Agg From 24ca96c430ea5e2e05810b683a8878aa7b16aecb Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Mon, 16 Jul 2018 13:22:36 -0700 Subject: [PATCH 2/2] Modify make.py instead of adding a matplotlibrc --- doc/make.py | 4 ++++ doc/source/matplotlibrc | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) delete mode 100644 doc/source/matplotlibrc diff --git a/doc/make.py b/doc/make.py index 4d54a2415a194..d85747458148d 100755 --- a/doc/make.py +++ b/doc/make.py @@ -363,6 +363,10 @@ def main(): sys.path.append(args.python_path) globals()['pandas'] = importlib.import_module('pandas') + # Set the matplotlib backend to the non-interactive Agg backend for all + # child processes. + os.environ['MPLBACKEND'] = 'module://matplotlib.backends.backend_agg' + builder = DocBuilder(args.num_jobs, not args.no_api, args.single, args.verbosity) getattr(builder, args.command)() diff --git a/doc/source/matplotlibrc b/doc/source/matplotlibrc deleted file mode 100644 index 88a83657331bd..0000000000000 --- a/doc/source/matplotlibrc +++ /dev/null @@ -1 +0,0 @@ -backend: Agg