{% set version = "1.7.3" %}
{% set buildnumber = 1 %}
{% set major = '.'.join(version.split('.')[0:2]) %}

package:
    name: scipy
    version: {{version}}

source:
    git_url: https://github.com/scipy/scipy.git
    git_tag: v{{version}}
    patches:
        - patches-{{ major }}/intel_lower_odr_opt_level.patch
        - patches-{{ major }}/intel_lower_isolve_opt_level.patch [ win or osx ]
        - patches-{{ major }}/intel_lower_fblas_opt_level.patch  [ win or osx ]
        - patches-{{ major }}/skip_stream_tests.patch
        - patches-{{ major }}/update_readme.patch

build:
    number: {{buildnumber}}
    script_env:
      - WHEELS_OUTPUT_FOLDER
    skip: True  # [py27]
    features:
      - nomkl                   [nomkl]

requirements:
    build:
      - {{ compiler('c') }}     # [win or (py>38 and osx)]
      - {{ compiler('icc') }}   >=2019.*

    host:
      - python 
      - pip
      - setuptools
      - intelpython >=2019.0
      - mkl-devel   >=2022.0      [not nomkl]
      - openblas    0.2.14        [linux and nomkl and (not ppc64le)]
      - numpy       1.19.5
      - pybind11
      - cython
      - dpcpp_cpp_rt
      - fortran_rt
      - libcxx                  # [osx]
    run:
      - {{ pin_compatible('numpy') }}
      - python
      - {{ pin_compatible('mkl') }}  [not nomkl]
      - dpcpp_cpp_rt
      - fortran_rt
      - vs2015_runtime          [win]
      - intelpython >=2019.0
      - openblas 0.2.14         [linux and nomkl and (not ppc64le)]
#      - libgfortran 3.0.0      [linux]
      - mkl_fft

test:
    #files:
    #  - intel_tester_config.py
    commands:
    #  - python -c "from intel_tester import test_routine; test_routine.test_exec()"
      - python -c "from scipy import test; test('full', extra_argv=['--disable-warnings'])"
    requires:
    #  - intel_tester
      - setuptools
      - pytest
      - mpmath  # mpmath is optionally used in testing special functions and statistics functions
    imports:
      - scipy

about:
    home: http://www.scipy.org/
    license: BSD-3-Clause
    license_file: LICENSE
    summary: Scientific Library for Python
    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://github.com/scipy/scipy/blob/master/LICENSE.txt" target="_blank">BSD-3-Clause</a>
        <br/><br/>
        SciPy is a Python-based ecosystem of open-source software for mathematics,
        science, and engineering.
    doc_url: http://www.scipy.org/docs.html
    dev_url: https://github.com/scipy/scipy
