{% set name = "numba" %}
{% set version = "0.53.1" %}
{% set sha256 = "c0d5ef90eb959f919cf134512259459430c58d566ff2124535572648b3b3931d" %}

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: 0
  entry_points:
    - pycc = numba.pycc:main
    - numba = numba.misc.numba_entry:main
  script:
    - {{ PYTHON }} -m pip install . --no-deps --ignore-installed -vvv
  # The conda-forge recipe claims "tbb" is really a runtime requirement, but
  # conda-build's DSO inspection process says otherwise.
  #ignore_run_exports:
  #  # tbb-devel triggers hard dependency on tbb, this is not the case.
  #  - tbb

requirements:
  build:
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
    # llvm is needed for the headers
    - llvm-openmp >=10.0  # [osx]


  host:
    - python
    - pip
    - setuptools
    - llvmlite 0.36.*
    - numpy
    - tbb-devel >=2019.5,<=2020.3
    - llvm-openmp >=10.0            # [osx]

  run:
    - python
    - {{ pin_compatible('llvmlite', max_pin='x.x') }}
    - {{ pin_compatible('numpy') }}
    # needed for pkg_resources
    - setuptools

  run_constrained:
    # If TBB is present it must be at least version 2019.5 from Anaconda due to
    # build flag issues triggering UB. It must also be <=2020.3 due to ABI
    # changes in TBB, see https://github.com/numba/numba/pull/6096.
    # 2020.3 is the last version with the "old" ABI
    - tbb  >=2019.5,<=2020.3
    # avoid confusion from openblas bugs
    - libopenblas !=0.3.6      # [x86_64]
    # CUDA 9.0 or later is required for CUDA support
    - cudatoolkit >=9.0
    # scipy 1.0 or later
    - scipy >=1.0

test:
  requires:
    # Required to test optional Numba features
    - jinja2
    - cffi
    - scipy
    - ipython
    - setuptools
    - tbb >=2019.5
    - intel-openmp             # [osx]
    # Need these for AOT. Do not init msvc as it may not be present
    - {{ compiler('c') }}      # [not win]
    - {{ compiler('cxx') }}    # [not win]
    # 10 tests fail on NumPy 1.20, 1 test fails on 1.19
    - numpy <1.19  # [py<39]
    - numpy <1.20  # [py>=39]

  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.roc.servicelib
    - 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
