{% set label = "'full'" %}
{% set tests = "['pywt']" %}
{% set name = "PyWavelets" %}
{% set version = "1.4.1" %}

package:
  name: {{ name|lower }}
  version: {{ version }}

source:
  url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
  sha256: 6437af3ddf083118c26d8f97ab43b0724b956c9f958e9ea788659f6a2834ba93

build:
  number: 0
  skip: True  # [py<38]
  script: {{ PYTHON }} -m pip install . --no-deps -vv

requirements:
  build:
    - {{ compiler('c') }}
  host:
    - python
    - cython >=0.29.24,<3.0
    # 2022/12/06: numpy versions are available for different platform and 
    # and meet the upstream requirements https://github.com/PyWavelets/pywt/blob/v1.4.1/pyproject.toml
    - numpy 1.18  # [py==38 and not (aarch64 or s390x or arm64)]
    - numpy 1.19  # [py==38 and (aarch64 or s390x or arm64)]
    - numpy 1.19  # [py==39 and not arm64]
    - numpy 1.21  # [(py==39 and arm64) or py==310]
    - numpy 1.23  # [py==311]
    - pip
    - setuptools <65
    - wheel
  run:
    - python
    - {{ pin_compatible('numpy') }}

test:
  requires:
    - pip
    - pytest
  imports:
    - pywt
  commands:
    - pip check
    {% set label = "'full'" %}
    {% set tests = "['pywt']" %}
    - python -c "import sys; import pywt; sys.exit(not pywt.test(verbose=2, label={{ label }}, tests={{ tests }}, extra_argv=['--durations=50']))"

about:
  home: https://github.com/PyWavelets/pywt
  license: MIT
  license_family: MIT
  license_file: LICENSE
  summary: Discrete Wavelet Transforms in Python
  description: |
    PyWavelets is a free Open Source library for wavelet transforms in Python.
    Wavelets are mathematical basis functions that are localized in both time and frequency.
    Wavelet transforms are time-frequency transforms employing wavelets. They are similar to
    Fourier transforms, the difference being that Fourier transforms are localized only in
    frequency instead of in time and frequency.
  doc_url: https://pywavelets.readthedocs.io/en/latest/
  dev_url: https://github.com/PyWavelets/pywt
  doc_source_url: https://github.com/PyWavelets/pywt/tree/master/doc

extra:
  recipe-maintainers:
    - grlee77
    - jakirkham
    - ocefpaf
