{% set name = "cffi" %}
{% set version = "1.11.4" %}
{% set hash_type = "sha256" %}
{% set hash = "df9083a992b17a28cd4251a3f5c879e0198bb26c9e808c4647e0a18739f1d11d" %}

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
  {{ hash_type }}: {{ hash }}
  patches:
    - setup-linux.patch  # [unix]
    - 0001-Link-to-dl-library.patch

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

requirements:
  host:
    - python
    - libffi  # [unix]
    - pycparser
    - setuptools
  build:
    - {{ compiler('c') }}
  run:
    - python
    - libffi  # [unix]
    - pycparser

test:
  imports:
    - cffi
    - _cffi_backend

about:
  home: https://bitbucket.org/cffi/cffi
  license: MIT
  license_file: LICENSE
  summary: Foreign Function Interface for Python calling C code.
  
  description: |
    Cffi aims to allow users to call C code from Python without having to
    learn a 3rd language. It provides a convenient and reliable way to call
    compiled C code from Python using interface declarations written in C.
  doc_url: http://cffi.readthedocs.org
  dev_url: https://bitbucket.org/cffi/cffi/overview
  doc_source_url: https://bitbucket.org/cffi/cffi/src/default/doc/?at=default

extra:
  recipe-maintainers:
    - goanpeca
    - inducer
    - jschueller
    - mingwandroid
