{% set name = "jupyterlab" %}
{% set version = "4.0.8" %}

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

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

build:
  number: 0
  # nodejs currently isn't available on s390x.
  skip: True  # [s390x or py<38]
  script: {{ PYTHON }} -m pip install --no-deps --no-build-isolation . -vv
  entry_points:
    - jupyter-lab = jupyterlab.labapp:main
    - jupyter-labextension = jupyterlab.labextensions:main
    - jupyter-labhub = jupyterlab.labhubapp:main
    - jlpm = jupyterlab.jlpmapp:main

app:
  entry: jupyter lab
  icon: icon.png
  summary: JupyterLab {{ version }}
  type: desk

requirements:
  host:
    - hatchling >=1.5.0
    - hatch-jupyter-builder >=0.3.2
    - pip
    - python
  run:
    - python
    - async-lru >=1.0.0
    - importlib-metadata >=4.8.3  # [py<310]
    - importlib_resources >=1.4  # [py<39]
    - ipykernel
    - jinja2 >=3.0.3
    - jupyter_core
    - jupyter-lsp >=2.0.0
    - jupyter_server >=2.4.0,<3
    - jupyterlab_server >=2.19.0,<3
    - notebook-shim >=0.2
    - packaging
    - traitlets
    - tornado >=6.2.0
    - tomli  # [py<311]
  run_constrained:
    - nodejs >=18.0.0

test:  
  source_files:
    - conftest.py
  requires:
    - pip
    - ripgrep
    - pytest >=7.0
    - pytest-console-scripts
    - pytest-jupyter >=0.5.3
    - pytest-timeout
    - pytest-tornasync
    - requests
    - nodejs
  imports:
    - jupyterlab
  commands:
    - pip check
    - jupyter lab --version
    - jlpm --version
    - jupyter-lab --help
    - jupyter-labextension --help
    - jupyter labextension list
    - jupyter lab licenses
    - jupyter lab path
    - jupyter server extension list
    - jupyter server extension list 1>server_extensions 2>&1
    - cat server_extensions | rg "jupyterlab.*{{ version.replace(".", "\\.") }}.*OK"  # [not win]
    - jupyter lab build --dev-build=False --minimize=False
    - jupyter lab clean
    - python -m pytest -vv --pyargs jupyterlab

about:
  home: https://github.com/jupyterlab/jupyterlab
  license: BSD-3-Clause
  license_family: BSD
  license_file:
    - LICENSE
    - jupyterlab/static/third-party-licenses.json
  summary: >
    An extensible environment for interactive and reproducible computing, based on the Jupyter Notebook and Architecture.
  doc_url: https://jupyterlab.readthedocs.io
  dev_url: https://github.com/jupyterlab/jupyterlab
  description: >
    JupyterLab is the next-generation user interface for Project Jupyter. It offers all the familiar building blocks of the classic Jupyter Notebook (notebook, terminal, text editor, file browser, rich outputs, etc.) in a flexible and powerful user inteface. Eventually, JupyterLab will replace the classic Jupyter Notebook.
    JupyterLab can be extended using extensions that are npm packages and use our public APIs. You can search for the GitHub topic or npm keyword `jupyterlab-extension` to find extensions. To learn more about extensions, see our user documentation.
    JupyterLab is suitable for general usage. For JupyterLab extension developers, the extension APIs will continue to evolve.

extra:
  recipe-maintainers:
    - jasongrout
    - blink1073
    - jochym
    - ian-r-rose
    - afshin
    - ellisonbg
    - jtpio
    - bollwyvl
