{% set name = "numba" %}
{% set version = "0.60.0" %}

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

source:
  url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
  sha256: 5df6158e5584eece5fc83294b949fd30b9f1125df7708862205217e068aabf16
  patches:
    # This forces a benign DeprecationWarning in test_import.py to be ignored.
    - patches/ignore_deprecation_warning_in_import_test.patch  # [py>=310 and win]
    # Build with numpy >=1.22.3 instead of 2.0.0rc1
    - patches/fix_numpy.patch

build:
  number: 0
  skip: true  # [python_impl == 'pypy']
  skip: true  # [py<39 or s390x]
  script:
    - export CC="${CC} -pthread"  # [linux]
    - export CXX="${CXX} -pthread"  # [linux]
    - {{ PYTHON }} -m pip install . --no-deps  --no-build-isolation --ignore-installed -vv
  entry_points:
    - numba = numba.misc.numba_entry:main
  ignore_run_exports:
    - libllvm14 >=14.0.6,<14.1.0a0

requirements:
  build:
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
    # llvm is needed for the headers
    - llvm-openmp              # [osx]
    - m2-patch  # [win]
    - patch     # [unix]
  host:
    - python
    - pip
    - setuptools
    - wheel
    - llvmlite 0.43.0
    - numpy 1.22.3 # [py<311]
    - numpy {{ numpy }} # [py>=311]
    - tbb-devel 2021.8.0
    - _openmp_mutex 5.1        # [linux]
  run:
    - python
    - llvmlite >=0.43.0,<0.44.0a0
    - {{ pin_compatible('numpy', upper_bound='1.27') }}

  run_constrained:
    - tbb >=2021.6,<2022
    # avoid confusion from openblas bugs
    - libopenblas !=0.3.6      # [x86_64]
    - libopenblas >=0.3.18, !=0.3.20  # [arm64]
    # CUDA 11.2 or later is required for CUDA support
    - cuda-version >=11.2
    - cudatoolkit >=11.2
    # scipy 1.0 or later
    - scipy >=1.0
    # CUDA Python 11.6 or later
    - cuda-python >=11.6
    # numba-rvsdg
    - numba-rvsdg 0.0.*      # [py==311]

test:
  requires:
    # Required to test optional Numba features
    - jinja2
    - cffi
    - scipy
    - ipython
    - ipykernel
    - pygments
    - pexpect
    - setuptools
    - pip
    - wheel
    - tbb >=2021.6,<2022
    # Need these for AOT.
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}

  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.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: https://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."
  dev_url: https://github.com/numba/numba
  doc_url: https://numba.readthedocs.io/

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