{% set name = "pillow" %}
{% set version = "9.2.0" %}

package:
  name: {{ name|lower }}
  version: {{ version }}

source:
  url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/Pillow-{{ version }}.tar.gz
  sha256: 75e636fd3e0fb872693f23ccb8a5ff2cd578801251f3a4f6854c6a5d437d3c04
  patches:                  # [unix]
    - disable_detect.patch  # [unix]

build:
  number: 0
  skip: true  # [py<37]
  ignore_run_exports:
    - tk
    - jpeg
    - freetype  # [win]
    - libtiff   # [win]
    - libwebp   # [win]
    - zlib      # [win]

requirements:
  build:
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
    - patch  # [unix]
  host:
    - python
    - pip
    - setuptools
    - wheel
    # Required by default
    - jpeg
    - zlib
    # Optional dependencies
    # (also can be incuded libwebp, libimagequant, libraqm, 
    # libxcb, openjpeg (it causes build errors on win32),
    # see https://pillow.readthedocs.io/en/latest/installation.html#external-libraries)
    - freetype
    - lcms2  # [not win]
    - libtiff
    - libwebp
    - tk
  run:
    - python
    - freetype
    - jpeg
    - libtiff
    - libwebp >=0.3.0
    - libwebp-base  # [osx and arm64]
    - tk
    - zlib

test:
  imports:
    - PIL
    - PIL.Image     # [not win]
    - PIL.ImageCms  # [not win]
  requires:
    - pip
  commands:
    - pip check

about:
  home: https://pillow.readthedocs.io
  license: LicenseRef-PIL
  license_family: Other 
  license_file: LICENSE
  summary: Pillow is the friendly PIL fork by Alex Clark and Contributors
  description: |
    Pillow is the friendly PIL fork. PIL is the Python Imaging Library,
    adds image processing capabilities to your Python interpreter.
  doc_url: https://pillow.readthedocs.io/en/4.2.x/
  doc_source_url: https://github.com/python-pillow/Pillow/blob/4.2.x/docs/index.rst
  dev_url: https://github.com/python-pillow/Pillow

extra:
  recipe-maintainers:
    - jakirkham
    - patricksnape
    - pelson
    - ocefpaf
