{% set name = "brotlipy" %}
{% set version = "0.7.0" %}
{% set sha256 = "36def0b859beaf21910157b4c33eb3b06d8ce459c942102f16988cca6ea164df" %}
{% set cross = False %}
{% if build_platform != target_platform and not build_platform.startswith('win') %}
{% set cross = True %}
{% endif %}

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

source:
  fn: {{ name }}-{{ version }}.tar.gz
  url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
  sha256: {{ sha256 }}

build:
  number: 1003
  script: python setup.py install --single-version-externally-managed --record=record.txt

requirements:
  build:
{% if cross %}
    - python
    - cross-python_{{ target_platform }}
    - cffi        >=1.0.0
{% endif %}
    - {{ compiler('c') }}
  host:
    - python
    - setuptools
    - cffi        >=1.0.0
  run:
    - python
    - cffi        >=1.0.0
    - enum34      # [py2k]

test:
  imports:
    - brotli

about:
  home: https://github.com/python-hyper/brotlipy
  license: MIT
  license_family: MIT
  license_file: LICENSE
  summary: 'Python bindings to the Brotli compression library'
  dev_url: https://github.com/python-hyper/brotlipy

extra:
  recipe-maintainers:
    - primozgodec
    - astaric
    - isuruf
