# Full credit goes to https://github.com/conda/conda-recipes for providing this recipe.
# It has been subsequently adapted for automated building with conda-forge.

{% set version = "3.1.1" %}

package:
  name: matplotlib
  version: {{ version }}

source:
  url: https://github.com/matplotlib/matplotlib/archive/v{{ version }}.tar.gz
  sha256: 29d1a239bb7d1095d98d8831bb661519ab0d23e30d38ed47729f554f15e8cd3e
  patches:
    # Find libpng on Windows.
    - 0001-Find-libpng-on-windows.patch  # [win]
    # A patch to make Qt the default backend.
    - cfg_qt5agg.patch  # [not osx]

build:
  number: 0
  skip: True    # [py<34]
  ignore_run_exports:
    - pyqt

requirements:
  build:
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
  host:
    - freetype
    - icu     # [linux]
    - python
    - setuptools
    - pkg-config  # [not win]
    - numpy
    - python-dateutil
    - msinttypes  # [win]
    - cycler >=0.10
    - nose
    - pyparsing
    - pytz
    - libpng
    - zlib
    - pyqt 5.9.*  # [not (osx or ppc64le)]
    - tk 8.6.*  # [linux]
  run:
    - python
    - setuptools
    - numpy
    - cycler >=0.10
    - python-dateutil
    - pytz
    - pyparsing
    - tk 8.6.*  # [linux]
    - tornado
    - pyqt 5.9.*  # [not (osx or ppc64le)]
    - kiwisolver

test:
  requires:
    - pytest
  imports:
    - matplotlib
    - matplotlib.pyplot
    - matplotlib._image
    - matplotlib._path
    - matplotlib._png
    - matplotlib._tri
    - matplotlib.backends._backend_agg
    - matplotlib.ft2font
    - matplotlib.ttconv
    - matplotlib.backends._tkagg  # [not win]
    - mpl_toolkits
    - pylab

about:
  home: http://matplotlib.org/
  license: PSF-based
  license_url: http://matplotlib.sourceforge.net/users/license.html
  license_family: PSF
  license_file: LICENSE/LICENSE
  summary: Publication quality figures in Python
  description: |
    matplotlib is a python 2D plotting library which produces publication
    quality figures in a variety of hardcopy formats and interactive
    environments across platforms. matplotlib can be used in Python scripts,
    the Python and IPython shell (ala MATLAB or Mathematica), web
    application servers, and six graphical user interface toolkits.
  dev_url: https://github.com/matplotlib/matplotlib/
  doc_url: http://matplotlib.org/contents.html

extra:
  recipe-maintainers:
    - mdboom
    - ocefpaf
    - pelson
    - tacaswell
    - dopplershift
