{% set name = "cyvcf2" %}
{% set version = "0.31.1" %}
{% set sha256 = "00bd0e09a3719d29fbc02bc8a40a690ac2c475e91744648750907d1816558fc5" %}

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

source:
  url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/cyvcf2-{{ version }}.tar.gz
  sha256: {{ sha256 }}
  patches:
    # Link to htslib shipped by conda
    - patches/setup.py.patch

build:
  number: 0
  skip: True  # [py < 37]
  script: {{ PYTHON }} -m pip install . --no-deps --no-build-isolation --no-cache-dir -vvv
  script_env:
    - CFLAGS=-Wno-implicit-function-declaration -Wno-int-conversion  # [osx and py == 38]
  entry_points:
    - cyvcf2 = cyvcf2.__main__:cli
  run_exports:
    - {{ pin_subpackage(name, max_pin="x.x") }}

requirements:
  build:
    - {{ compiler('c') }}
    - autoconf
    - automake
    - make
  host:
    - python
    - cython
    - pip
    - curl
    - zlib
    - htslib >=1.10
    - openssl
    - numpy >=2.0.0  # [py >= 39]
    - numpy  # [py < 39]
  run:
    - python
    - coloredlogs
    - click
    - {{ pin_compatible('numpy') }}

test:
  imports:
    - cyvcf2
  commands:
    - cyvcf2 --help

about:
  home: "https://github.com/brentp/cyvcf2/"
  summary: "A cython wrapper around htslib built for fast parsing of Variant Call Format (VCF) files"
  license: MIT
  license_family: MIT
  license_file: LICENSE
  doc_url: "https://brentp.github.io/cyvcf2/"
  dev_url: "https://github.com/brentp/cyvcf2/"

extra:
  identifiers:
    - doi:10.1093/bioinformatics/btx057
    - biotools:cyvcf2
  additional-platforms:
    - linux-aarch64
