{% set version = "7.3.2" %}

{% set python_min = python_min | default("3.9") %}

# the `if` avoids bot duplications
{% if 1 %}{% set lab_version = ">=4.3.4,<4.4" %}{% endif %}

package:
  name: notebook
  version: {{ version }}

source:
  url: https://pypi.org/packages/source/n/notebook/notebook-{{ version }}.tar.gz
  sha256: 705e83a1785f45b383bf3ee13cb76680b92d24f56fb0c7d2136fe1d850cd3ca8

build:
  number: 0
  noarch: python
  script:
    - {{ PYTHON }} -m pip install . --no-deps -vv --no-build-isolation --disable-pip-version-check
  entry_points:
    - jupyter-notebook = notebook.app:main

requirements:
  host:
    - hatch-jupyter-builder >=0.5
    - hatchling >=1.11
    - jupyterlab {{ lab_version }}
    - pip
    - python {{ python_min }}
  run:
    - importlib_resources >=5.0
    - jupyter_server >=2.4.0,<3
    - jupyterlab {{ lab_version }}
    - jupyterlab_server >=2.27.1,<3
    - notebook-shim >=0.2,<0.3
    - python >={{ python_min }}
    - tornado >=6.2.0

test:
  requires:
    - m2-grep  # [win]
    - pip
    - python {{ python_min }}
  imports:
    - notebook
  commands:
    - pip check
    - jupyter notebook -h
    - jupyter-notebook -h
    - jupyter labextension list
    - jupyter labextension list 1>labextensions 2>&1
    - grep -iE "@jupyter-notebook/lab-extension.*OK" labextensions

about:
  home: https://github.com/jupyter/notebook
  license: BSD-3-Clause
  license_family: BSD
  license_file:
    - LICENSE
    - notebook/labextension/static/third-party-licenses.json
    - notebook/static/third-party-licenses.json
  summary: A web-based notebook environment for interactive computing
  doc_url: https://jupyter-notebook.readthedocs.io
  doc_source_url: https://github.com/jupyter/notebook/tree/v{{ version }}/docs

extra:
  recipe-maintainers:
    - krassowski
    - SylvainCorlay
    - jakirkham
    - minrk
    - pelson
    - gnestor
    - takluyver
    - lresende
    - bollwyvl
    - blink1073
    - davidbrochart
    - jtpio
