{% set name = "numba" %}
{% set version = "0.56.4" %}
{% set sha256 = "ab96b731fb9dee12b404b42b7c1fb82c119352648906a80526afa73658895b73" %}

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

source:
  # url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
  url: https://github.com/numba/{{ name }}/archive/{{ version }}.tar.gz
  sha256: {{ sha256 }}

build:
  number: 1
  entry_points:
    - pycc = numba.pycc:main
    - numba = numba.misc.numba_entry:main
  script:
    - export CC="${CC} -pthread"  # [linux]
    - export CXX="${CXX} -pthread"  # [linux]
    - {{ PYTHON }} -m pip install . --no-deps --ignore-installed -vvv
  ignore_run_exports:
    # tbb-devel triggers hard dependency on tbb, this is not the case.
    - tbb
  skip: true  # [python_impl == 'pypy']
  skip: true  # [py<37]

requirements:
  build:
    - python                                 # [build_platform != target_platform]
    - cross-python_{{ target_platform }}     # [build_platform != target_platform]
    - numpy                                  # [build_platform != target_platform]
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
    # llvm is needed for the headers
    - llvm-openmp              # [osx]

  host:
    - python
    - pip
    - setuptools
    - llvmlite 0.39.*
    - numpy
    - tbb-devel 2021.*,<2021.6

  run:
    - python
    - {{ pin_compatible('llvmlite', max_pin='x.x') }}
    - {{ pin_compatible('numpy') }}
    - importlib-metadata  # [py < 39]
    # needed for pkg_resources
    - setuptools

  run_constrained:
    - tbb  2021.*  # [not (armv6l or armv7l or aarch64 or linux32 or ppc64le)]
    # avoid confusion from openblas bugs
    - libopenblas !=0.3.6  # [x86_64]
    - libopenblas >=0.3.18, !=0.3.20  # [arm64]
    # CUDA 10.2 or later is required for CUDA support
    - cudatoolkit >=10.2
    # scipy 1.0 or later
    - scipy >=1.0
    # NumPy has a hard upper limit.
    # Also NumPy 1.22.0, 1.22.1, 1.22.2 are all broken for ufuncs
    # xref: https://github.com/numba/numba/issues/7756
    - numpy >=1.18,!=1.22.0,!=1.22.1,!=1.22.2,<1.24
    # CUDA Python 11.6 or later
    - cuda-python >=11.6

test:
  requires:
    - pip
    # Required to test optional Numba features
    - jinja2
    - cffi
    - scipy
    - ipython
    - setuptools
    - tbb >=2021.0
    - llvm-openmp              # [osx]
    # Need these for AOT. Do not init msvc as it may not be present
    - {{ compiler('c') }}      # [not win]
    - {{ compiler('cxx') }}    # [not win]

  imports:
    - numba
    - numba.core.annotations
    - numba.core.datamodel
    - numba.core.rewrites
    - numba.core.runtime
    - numba.core.typeconv
    - numba.core.typing
    - numba.core.unsafe
    - numba.cuda
    - numba.cuda.cudadrv
    - numba.cuda.kernels
    - numba.cuda.simulator
    - numba.cuda.simulator.cudadrv
    - numba.cuda.tests
    - numba.cuda.tests.cudadrv
    - numba.cuda.tests.cudadrv.data
    - numba.cuda.tests.cudapy
    - numba.cuda.tests.cudasim
    - numba.cuda.tests.nocuda
    - numba.experimental.jitclass
    - numba.np.ufunc
    - numba.pycc
    - numba.scripts
    - numba.testing
    - numba.tests
    - numba.tests.npyufunc

about:
  home: http://numba.pydata.org
  license: BSD-2-Clause
  license_family: BSD
  license_file: LICENSE
  summary: NumPy aware dynamic Python compiler using LLVM
  description: |
    Numba is an Open Source NumPy-aware optimizing compiler for Python 
    sponsored by Anaconda, Inc. It uses the remarkable LLVM compiler 
    infrastructure to compile Python syntax to machine code."
  doc_url: http://numba.pydata.org/
  dev_url: https://github.com/numba/numba

extra:
  recipe-maintainers:
    - souravsingh
    - marcelotrevisani
    - henryiii
    - mbargull
    - jakirkham
    - step21
