{% set version = "0.24.2" %}
{% set buildnumber = 4 %}

### If you change the iccver here, you must also set the path correctly in build.sh / bld.bat!!!
{% set iccver = "16.0.3" %}    [unix or py3k]
{% set iccver = "13.1.5" %}    [win and py27]

package:
    name: scikit-learn
    version: {{version}}

source:
    - git_url: https://github.com/scikit-learn/scikit-learn.git
      git_tag: {{version}}
      patches:
        - intel_use_daal4py_modif.patch       [not nomkl and (unix or py3k)]
        - intel_setup_add_whl_deps_modif.patch [not nomkl and (unix or py3k)]
      #  - intel_icc-use-qopenmp.patch
        - intel_output_modif.patch

    - url: https://raw.githubusercontent.com/intel/scikit-learn-intelex/master/deselected_tests.yaml
    - url: https://raw.githubusercontent.com/intel/scikit-learn-intelex/master/.circleci/deselect_tests.py

requirements:
    build:
      - {{ compiler('c') }}   # [win]
      - {{ compiler('icc') }}
    host:
      - python
      - setuptools
      - numpy             # [win or osx or py==38]
      - numpy 1.17        # [linux and py==37]
      - scipy
      - mkl-devel >=2020.0      [not nomkl]
      - cython
      - wheel
      - threadpoolctl
      - joblib >=0.11

    run:
      - {{ pin_compatible('numpy') }}
      - python
      - scipy
      - scikit-learn-intelex    [not nomkl and (unix or py3k)]
      - mkl  >=2019             [not nomkl]
      - threadpoolctl
      - intelpython >=2019
      - icc_rt >={{iccver}}
      - joblib >=0.11

build:
    number: {{buildnumber}}
    script_env:
      - WHEELS_OUTPUT_FOLDER
    features:
      - nomkl                   [nomkl]

test:
    files:
      - intel_tester_config.py
    source_files:
      - deselected_tests.yaml
      - deselect_tests.py
    commands:
      - python -c "from intel_tester import test_routine; test_routine.test_exec()"
    requires:
      - intel_tester
      - pytest >=3.3
      - setuptools
      - matplotlib
      - pandas
      - threadpoolctl
      - pyyaml

    imports:
      - sklearn

about:
    home: http://scikit-learn.org/stable/
    license: BSD-3-Clause
    license_family: BSD
    license_file: COPYING
    summary: A set of python modules for machine learning and data mining
    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/BSD-3-Clause" target="_blank">BSD-3-Clause</a>
      <br/><br/>
