{% set version = "2021.6.0" %}
{% set buildnumber = 0 %}

package:
  name: daal4py
  version: {{ version }}

source:
  url: https://github.com/intel/scikit-learn-intelex/archive/{{ version }}.tar.gz
  sha256: a75acdc518f0af262a86952ee1040d5c8b9a9dbd4bf798fd974a917ee5b47e68
  patches:
    - patches/0001-replace-check_estimator_sparse_data-in-tests.patch
    # For patch 0002, see: https://github.com/python/cpython/issues/84006
    - patches/0002-win-64-py37-distutils.patch  # [win and py==37]
build:
  number: {{ buildnumber }}
  skip: True  # [not ((win or linux or osx) and x86_64)]
  skip: True  # [py<36]
  missing_dso_whitelist:      # [osx]
    - lib/libc++.1.dylib      # [osx]

requirements:
  build:
    - make  # [linux or osx]
    - {{ compiler('cxx') }}  # [not osx]
    - patch     # [unix]
    - m2-patch  # [win]
  host:
    - python
    - setuptools
    - numpy
    - dal-devel ==2021.6.0=hdb19cb5_916  # [linux]
    - dal-devel ==2021.6.0=haf03e11_929  # [osx]
    - dal-devel ==2021.6.0=h59b6b97_874  # [win]
    - cython
    - jinja2
    - mpich      # [not win]
    - clang-tools
    - cmake
    - pybind11
  run:
    - python
    - dal ==2021.6.0=hdb19cb5_916  # [linux]
    - dal ==2021.6.0=haf03e11_929  # [osx]
    - dal ==2021.6.0=h59b6b97_874  # [win]
    - {{ pin_compatible('numpy') }}

test:
  requires:
    - pandas
    - scipy
    - scikit-learn <1.1
    - xgboost       # [not win and py<=38]
    - lightgbm      # [linux]
    - pytest
    - mpich         # [not win]
  source_files:
    - examples
    - tests
    - daal4py
    - onedal
  commands:
    - cd tests
    - python -c "import daal4py"
    - mpirun -n 4 python -m unittest discover -v -p spmd*.py      # [not win]
    - python -m unittest discover -v -p 'test*.py'
    - pytest --pyargs ../daal4py/sklearn/
    - pytest --pyargs ../onedal/
    - python ../examples/daal4py/run_examples.py
    - python -m daal4py ../examples/daal4py/sycl/sklearn_sycl.py

about:
  home: https://intelpython.github.io/daal4py/
  license: Apache-2.0
  license_family: Apache
  license_file:
    - LICENSE
    - doc/daal4py/third-party-programs.txt
  summary: A convenient Python API to Intel (R) oneAPI Data Analytics Library
  dev_url: https://github.com/intel/scikit-learn-intelex
  doc_url: https://intelpython.github.io/daal4py

extra:
  recipe-maintainers:
    # GitHub IDs for maintainers of the recipe.
    - napetrov
    - Alexsandruss
