[buildout]
extends =
  ../numpy/buildout.cfg
  ../pkgconfig/buildout.cfg
  ../libpng/buildout.cfg
  ../freetype/buildout.cfg
  ./buildout.hash.cfg

parts =
  matplotlib

[matplotlibrc]
recipe = slapos.recipe.template:jinja2
location = ${buildout:parts-directory}/${:_buildout_section_name_}
url = ${:_profile_base_location_}/${:filename}
output = ${matplotlibrc:location}/matplotlibrc
backend = agg
context =
  key backend matplotlibrc:backend

[matplotlib-env]
<= numpy-env
PATH = ${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH = ${libpng:location}/lib/pkgconfig:${freetype:location}/lib/pkgconfig:${zlib:location}/lib/pkgconfig
CFLAGS = -I${libpng:location}/include -I${freetype:location}/include

[matplotlib]
recipe = zc.recipe.egg:custom
egg = matplotlib
environment = matplotlib-env
setup-eggs =
  cycler
  python-dateutil
  ${numpy:egg}
rpath =
  ${libpng:location}/lib
  ${freetype:location}/lib
need-matplotlibrc = ${matplotlibrc:location}

[versions]
matplotlib = 2.1.2
cycler = 0.11.0

[versions:sys.version_info < (3,8)]
cycler = 0.10.0
