{% set version = "1.12.3" %}

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

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

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

requirements:
  build:
    - {{ compiler('c') }}
  host:
    - python
    - pip
    - libffi  # [not win]
    - pycparser
  run:
    - python
    - libffi  # [not win]
    - pycparser

test:
  imports:
    - cffi
    - _cffi_backend
  requires:
    - openssl

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