{% set version = "6.21.2" %}

{% set migrating = false %}

package:
  name: ipykernel
  version: {{ version }}

source:
  url: https://pypi.io/packages/source/i/ipykernel/ipykernel-{{ version }}.tar.gz
  sha256: 6e9213484e4ce1fb14267ee435e18f23cc3a0634e635b9fb4ed4677b84e0fdf8

build:
  number: 0
  noarch: python
  script:
    - {{ PYTHON }} -m pip install . --no-deps -vv
    - {{ PYTHON }} -m ipykernel install --sys-prefix
    # TODO: this may be needed/desirable at some point
    # - cd {{ RECIPE_DIR }} && {{ PYTHON }} fix_kernelspec.py
  script_env:
    - MIGRATING={{ migrating }}

requirements:
  host:
    - debugpy >=1.6.5
    - comm >=0.1.1
    - hatchling >=1.4
    - ipython >=7.23.1
    - jupyter_client >=6.1.12
    - packaging
    - pip
    - psutil
    # note: make sure host python and test python don't match
    # to provoke possible cross-version noarch issues
    - python 3.9
  run:
    - __{{ noarch_platform }}
    {% if noarch_platform == "osx" %}
    - appnope
    {% endif %}
    - comm >=0.1.1
    - debugpy >=1.6.5
    - ipython >=7.23.1
    - jupyter_client >=6.1.12
    - jupyter_core >=4.12,!=5.0.*
    - matplotlib-inline >=0.1
    - packaging
    - psutil
    - python >=3.8
    - pyzmq >=20
    - tornado >=6.1
    - traitlets >=5.4.0
    - nest-asyncio

test:
  requires:
    # note: make sure host python and test python don't match
    # to provoke possible cross-version noarch issues
    - python 3.8
    - curio  # [not win]

    - flaky
    - numpy
    - pip
    - pytest >=6.0
    - pytest-asyncio
    - pytest-cov
    - pytest-timeout
    {% if not migrating %}
    - ipyparallel
    - matplotlib-base
    {% endif %}
    # TODO: remove eventually
    - jupyter_client !=7.3.2=*_0

  imports:
    - ipykernel
  commands:
    - pip check
    - jupyter kernelspec list

about:
  home: https://ipython.org
  license: BSD-3-Clause
  license_family: BSD
  license_file: COPYING.md
  summary: IPython Kernel for Jupyter
  description: |
    A powerful interactive Python shell and a Jupyter kernel to work with
    Python code in Jupyter notebooks and other interactive frontends.
  dev_url: https://github.com/ipython/ipykernel
  doc_url: https://ipython.readthedocs.io
  doc_source_url: https://github.com/ipython/ipykernel/blob/master/docs/index.rst

extra:
  recipe-maintainers:
    - blink1073
    - bollwyvl
    - Carreau
    - jakirkham
    - minrk
    - ocefpaf
    - pelson
    - davidbrochart
