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

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

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

build:
  number: 0
  # nodejs >=14,!=15.*,<17 currently isn't available on s390x.
  skip: True  # [s390x or py<37]
  script: {{ PYTHON }} -m pip install --install-option="--skip-npm" --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:
    - jupyter-packaging 0.12.0
    - packaging
    - pip
    - python
    - setuptools
    - wheel
  run:
    - ipython
    - jinja2 >=2.1
    - jupyter_core
    - jupyter_server >=1.16,<3
    - jupyter_server_ydoc >=0.8.0,<0.9.0
    - jupyter_ydoc >=0.2.3,<0.3
    - jupyterlab_server >=2.19,<3
    - nbclassic
    - notebook <7
    - packaging
    - python
    - tomli  # [py<311]
    - tornado >=6.1.0

test:
  requires:
    - nodejs >=16.*,!=17.*,<19
    - pip
    - ripgrep
  imports:
    - jupyterlab
  commands:
    - pip check
    - jupyter lab --version
    - jlpm --version
    - jlpm versions
    - jupyter labextension list
    - jupyter lab licenses
    - jupyter lab path
    - jupyter server extension list
    - jupyter serverextension list
    - jupyter server extension list 1>server_extensions 2>&1
    - cat server_extensions | rg "jupyterlab.*{{ version.replace(".", "\\.") }}.*OK"  # [not win]
    - jupyter serverextension list 1>serverextensions 2>&1
    - cat serverextensions | rg "jupyterlab.*{{ version.replace(".", "\\.") }}.*OK"   # [not win]
    # This is disabled because it depends on webpack 5.x, which in turn depends on Uppercase_Letter
    # and Lowercase_Letter character classes in nodejs, which requires full ICU support. The code
    # uses webpack 5.x features, so it is not trivial to work around.
    # - jupyter lab build --dev-build=False --minimize=False
    - jupyter lab clean
  #downstreams:
    # Additional testing for downstreams packages: ipympl, plotly, and pyviz_comms
    #- ipympl
    #- plotly
    #- pyviz_comms

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
