{% set version = "4.8.0" %}

{% set python_min = python_min | default("3.9") %}

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

source:
  url: https://pypi.org/packages/source/a/anyio/anyio-{{ version }}.tar.gz
  sha256: 1d9fe889df5212298c0c0723fa20479d1b94883a2df44bd3897aa91083316f7a

build:
  number: 0
  noarch: python
  script:
    - {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation --disable-pip-version-check

requirements:
  host:
    - pip
    - python {{ python_min }}
    - setuptools >=64
    - setuptools-scm >=6.4
  run:
    - exceptiongroup >=1.0.2
    - idna >=2.8
    - python >={{ python_min }}
    - sniffio >=1.1
    - typing_extensions >=4.5
  run_constrained:
    - trio >=0.26.1
    - uvloop >=0.21

test:
  source_files:
    - tests
    - pyproject.toml
  requires:
    - coverage >=7
    - exceptiongroup >=1.2.0
    - hypothesis >=4.0
    - mock >=4
    - pip
    - psutil >=5.9
    - pytest >=7.0
    - pytest-mock >=3.6.1
    - python {{ python_min }}
    - tomli
    - trio
    - trustme
    - uvloop  # [unix]
  imports:
    - anyio
  commands:
    - pip check
    - coverage run --source anyio --branch -m pytest --tb=long --color=yes -k="not (bind_link_local or block_device or connection_refused or happy_eyeballs or ipv6)"
    - coverage report --show-missing --skip-covered --fail-under 85  # [linux]

about:
  home: https://github.com/agronholm/anyio
  license: MIT
  license_family: MIT
  license_file: LICENSE
  summary: High level compatibility layer for multiple asynchronous event loop implementations on Python
  doc_url: https://anyio.readthedocs.io
  doc_source_url: https://github.com/agronholm/anyio/tree/{{ version }}/docs

extra:
  recipe-maintainers:
    - bollwyvl
    - CJ-Wright
    - dhirschfeld
