# The package daal4py depends on dal and dal-devel packages from the intel_repack-feedstock,
# so be sure to update them before updating daal4py. 
{% set version = "2023.1.1" %}
{% set dal_version = "2023.1.1" %}
{% set numpy = "1.19.5" %}  # [py<=39 and not (osx and arm64)]
{% set numpy = "1.21" %}  # [py<=39 and (osx and arm64)]
{% set numpy = "1.22" %}  # [py>39 and py<311]
{% set numpy = "1.23" %}  # [py>=311]

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

source:
  url: https://github.com/intel/scikit-learn-intelex/archive/{{ version }}.tar.gz
  sha256: 451b8c5e6d3a0f4b147a68ffe37bbddf7fc2e706083ec3e57479ec4421a7d963
  patches:
    - patches/0004_set_cmake_python_executable.patch

build:
  number: 0
  skip: True  # [not ((win or linux or osx) and x86_64)]
  skip: True  # [py<38]

requirements:
  build:
    - make  # [not win]
    - {{ compiler('cxx') }}  # [not osx]
    - cmake
    - patch     # [unix]
    - m2-patch  # [win]
  host:
    - python
    - clang-format 14.0.6
    - cython 0.29.33
    - dal-devel {{ dal_version }}
    - jinja2
    - mpich 4.1.1  # [not win]
    - numpy {{ numpy }}
    - pip
    - pybind11
    - setuptools
    - wheel
  run:
    - python
    - dal {{ dal_version }}
    - libcxx  # [osx]
    - {{ pin_compatible('numpy') }}

test:
  requires:
    - catboost      # [py<=310]
    # The dependant package scikit-learn-intelex requires library_version_info.h and should be in the services folder, 
    # see https://github.com/intel/scikit-learn-intelex/blob/987b5102fba322d604f29a17db039301e6f8dfbc/scripts/version.py#L39
    - dal-include {{ dal_version }}
    - lightgbm      # [linux]
    - mpich 4.1.1   # [not win]
    - pandas
    - pytest
    - scikit-learn
    - scipy
    - xgboost       # [not win and py<=38]
  source_files:
    - examples
    - tests
    - daal4py
    - onedal

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
  description: |
    <strong>LEGAL NOTICE: Use of this software package is subject to the
    software license agreement (as set forth above, in the license section of
    the installed Conda package and/or the README file) and all notices,
    disclaimers or license terms for third party or open source software
    included in or with the software.</strong>
    <br/><br/>
    EULA: <a href="https://opensource.org/licenses/Apache-2.0" target="_blank">Apache-2.0</a>
    <br/><br/>
  dev_url: https://github.com/intel/scikit-learn-intelex
  doc_url: https://intelpython.github.io/daal4py

extra:
  recipe-maintainers:
    - napetrov
    - Alexsandruss
