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

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

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

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 . -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 PRE-ALPHA
  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
    - jupyterlab_server >=2.10,<3
    - nbclassic
    - notebook <7
    - packaging
    - python
    - tomli
    - tornado >=6.1.0

test:
  requires:
    - nodejs >=14,!=15.*,!=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]
    - 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
