{% set version = "1.14.6" %}

package:
  name: cffi
  version: {{ version }}

source:
  url: https://pypi.io/packages/source/c/cffi/cffi-{{ version }}.tar.gz
  sha256: c9a875ce9d7fe32887784274dd533c57909b7b1dcadcc128a2ac21331a9765dd
  patches:
    - setup-linux.patch  # [not win]
    - 0001-Link-to-dl-library.patch

build:
  number: 0
  script: {{ PYTHON }} -m pip install . -vv

requirements:
  build:
    - python                                 # [build_platform != target_platform]
    - cross-python_{{ target_platform }}     # [build_platform != target_platform]
    - {{ compiler('c') }}
  host:
    - python
    - pip
    - libffi  # [not win]
    - pycparser
  run:
    - python
    - libffi  # [not win]
    - pycparser

test:
  imports:
    - cffi
    - _cffi_backend
  requires:
    - pip
    - openssl
  commands:
    - pip check

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
    - ocefpaf
    - mingwandroid
