Skip to content

Commit

Permalink
Use the Agg backend for docs builds (#21914)
Browse files Browse the repository at this point in the history
* 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.

* Modify make.py instead of adding a matplotlibrc
  • Loading branch information
tdsmith authored and jreback committed Jul 17, 2018
1 parent 4802002 commit a860028
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)()
Expand Down

0 comments on commit a860028

Please sign in to comment.