{% set name = "pycurl" %}
{% set version = "7.45.4" %}
{% set sha256 = "32c8e237069273f4260b6ae13d1e0f99daae938977016021565dc6e11050e803" %}

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

source:
  url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
  sha256: {{ sha256 }}
  patches:
    - patches/msvc_warnings.patch  # [win]

build:
  number: 0
  detect_binary_files_with_prefix: False
  skip: true  # [py<35]

requirements:
  build:
    - {{ compiler('c') }}
    - m2-patch   # [win]
    - openssl    # [win]
  host:
    - python
    - setuptools
    - wheel
    - pip
    - libcurl {{ libcurl }}
    - openssl {{ openssl }}  # [not win]
  run:
    - python
    - openssl  # [not win]

test:
  requires:
    - pip
    - pytest >=5
    - flask
    - flaky
    - pyflakes
  source_files:
    - pytest.ini
    - README.rst
    - setup.py
    - tests
  commands:
    - pip check
    # Skip tests for SSL backends we don't support.
    # TLS 1.3 cipher configuration is supporting starting with curl 8.10.0. The test_*tls13_ciphers tests may be
    # enabled again once this is the supported version in the CBC. https://github.com/curl/curl/issues/13873
    - pytest -v tests -k "not (test_keyfunction or test_proxy_tlsauth or test_libcurl_ssl_gnutls or test_libcurl_ssl_nss or test_libcurl_ssl_openssl or test_tls13_ciphers or test_proxy_tls13_ciphers)"

about:
  home: http://pycurl.io/
  license: LGPL-2.1-or-later OR MIT
  license_file:
    - COPYING-LGPL
    - COPYING-MIT
  license_family: LGPL
  summary: A Python Interface To The cURL library
  description: |
    PycURL is a Python interface to libcurl, the multiprotocol file transfer library.
    Similarly to the urllib Python module, PycURL can be used to fetch objects identified
    by a URL from a Python program.
  doc_url: http://pycurl.io/docs/latest/index.html
  dev_url: https://github.com/pycurl/pycurl

extra:
  skip-lints:
    - http_url
  recipe-maintainers:
    - chrisburr
