{% set version = "2.0.2" %}
{% set sha256 = "b7bead8cf6210eadf9cecf356e17af794f57c0939a3d420a00d87ea652f87b49" %}
{% set pip_name = "xxhash" %}
{% set name = "python-xxhash" %}

package:
  name: {{ name|lower }}
  version: {{ version }}

source:
  sha256: {{ sha256 }}
  url: https://pypi.io/packages/source/{{ pip_name[0] }}/{{ pip_name }}/{{ pip_name }}-{{ version }}.tar.gz

build:
  number: 1
  script:
    - export XXHASH_LINK_SO=1  # [unix]
    - SET XXHASH_LINK_SO=1  # [win]
    - {{ PYTHON }} -m pip install --no-deps --ignore-installed .

requirements:
  build:
    - {{ compiler('c') }}
  host:
    - python
    - msinttypes  # [win and py<35]
    - pip
    - setuptools
    - wheel
    - xxhash
  run:
    - python
    - xxhash

test:
  imports:
    - xxhash
  commands:
    - pip check
  requires:
    - pip

about:
  home: https://github.com/ifduyue/python-xxhash
  license: BSD-2-Clause
  license_file: LICENSE
  license_url: https://github.com/ifduyue/python-xxhash/blob/v{{ version }}/LICENSE
  summary: Python binding for xxHash
  description: |
    Python binding for xxHash which is an extremely fast hash algorithm, processing at RAM speed limits. Code is highly portable, and produces hashes identical across all platforms (little / big endian).
  license_family: BSD
  doc_url: https://github.com/ifduyue/python-xxhash/tree/v{{ version }}
  doc_source_url: https://raw.githubusercontent.com/ifduyue/python-xxhash/v{{ version }}/README.rst
  dev_url: https://github.com/ifduyue/python-xxhash/tree/v{{ version }}

extra:
  recipe-maintainers:
    - mariusvniekerk
