{% set version = "1.0.1" %}

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

source:
  url: https://github.com/scipy/scipy/archive/v{{ version }}.tar.gz
  sha256: a0eaaa6b6958db9d89f8ef0ce23391fedebac3fb416e05bdd966e6895dd6cd3d
  patches:
    # patches to get unit tests to pass on ppc64le
    - 0001-reduce-precision-in-legredre-tests.patch                 # [ppc64le]
    - 0002-reduce-precision-in-special-orthogonal-tests.patch       # [ppc64le]
    - 0003-supress-overflow-warning-in-special-test_basic.patch     # [ppc64le]
    - 0004-limit-precision-of-complex256-in-test_signaltools.patch  # [ppc64le]
    - 0005-relax-precision-in-sparse-linalg-isolve-lsmr-test.patch  # [ppc64le]
    # Relax precision in a few units tests so they pass when using MKL
    - relax_precision_in_tests.patch

build:
  number: 0
  # conda 4.4+ can use this
  skip: True  # [blas_impl == 'openblas' and win]
  requires_features:
    blas: {{ blas_impl }}
  # this is for conda 4.3 and below
  features:
    - nomkl    # [x86 and blas_impl != 'mkl']

requirements:
  build:
    # on windows, Parallel studio activates the appropriate c/cxx compiler
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('cxx') }}      # [not win]
    - {{ compiler('fortran') }}
  host:
    - python
    - setuptools
    - cython
    - numpy
    - mkl-devel  {{ mkl }}  # [blas_impl == 'mkl']
    - openblas-devel {{ openblas }}  # [blas_impl == 'openblas']
    - nomkl  # [x86 and blas_impl == 'openblas']
    - msinttypes   # [win and vc<14]
  run:
    - python
    - {{ pin_compatible('numpy') }}

test:
  requires:
    - pytest
    - mpmath
    - nomkl  # [x86 and blas_impl == 'openblas']
  commands:
    - conda inspect linkages -p $PREFIX scipy  # [not win]
    - conda inspect objects -p $PREFIX scipy  # [osx]

about:
  home: http://www.scipy.org/
  license: BSD 3-Clause
  license_file: LICENSE.txt
  summary: Scientific Library for Python
  description: |
    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

extra:
  recipe-maintainers:
    - jakirkham
    - msarahan
    - rgommers
    - ocefpaf
