{% set name = "llvmlite" %}
{% set version = "0.44.0" %}

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

source:
  url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/llvmlite-{{ version }}.tar.gz
  sha256: 07667d66a5d150abed9157ab6c0b9393c9356f229784a4385c02f99e94fc94d4
build:
  number: 1
  skip: true  # [py<310 or s390x]
  script_env:
    - PY_VCRUNTIME_REDIST

requirements:
  build:
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
    - cmake
    - make                   # [unix]
  host:
    - python
    - pip
    - setuptools
    - wheel
    # Statically linking to llvmdev ! see comments in build.sh
    - llvmdev 15.*
    # zlib on win because our llvmdev is not built with LLVM_ENABLE_ZLIB=OFF
    # zlib and zstd on others because we are statically linking to llvmdev
    - zlib {{ zlib }}
    - zstd {{ zstd }}
  run:
    - python
    - zlib # bounds through run_exports
    - zstd # bounds through run_exports

test:
  requires:
    - pip
  imports:
    - llvmlite
    - llvmlite.binding
    - llvmlite.ir
    - llvmlite.tests
  commands:
    - pip check
    - export LLVMLITE_DIST_TEST=''  # [unix]
    - set LLVMLITE_DIST_TEST=""     # [win]
    - python -m llvmlite.tests
  downstreams:
    - numba

about:
  home: https://llvmlite.readthedocs.io
  license: BSD-2-Clause
  license_file: LICENSE
  license_family: BSD
  summary: A lightweight LLVM python binding for writing JIT compilers.
  description: llvmlite provides a Python binding to LLVM for use in Numba. Numba previously relied on llvmpy.
  doc_url: https://llvmlite.pydata.org
  dev_url: https://github.com/numba/llvmlite

extra:
  skip-lints:
    # llvmlite is a LLVM python binding, which is why it uses llvm directly in host
    - should_use_compilers
  recipe-maintainers:
    - jakirkham
    - souravsingh
    - marcelotrevisani
    - xhochy
    - mbargull
