{% set name = "jupyterlab_server" %}
{% set version = "2.27.3" %}

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

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

build:
  number: 0
  # jupyterlab_server isn't available on s390x yet.
  skip: true  # [py<38 or s390x]
  script: {{ PYTHON }} -m pip install . --no-deps --no-build-isolation --ignore-installed --no-cache-dir -vvv

requirements:
  host:
    - python
    - pip
    - hatchling >=1.7
  run:
    - python
    - babel >=2.10
    - importlib-metadata >=4.8.3  # [py<310]
    - jinja2 >=3.0.3
    - json5 >=0.9.0
    - jsonschema >=4.18.0
    - jupyter_server >=1.21,<3
    - packaging >=21.3
    - requests >=2.31
  run_constrained:
    - openapi-core >=0.18.0,<0.19.0

test:
  imports:
    - jupyterlab_server
  requires:
    - pip
  commands:
    - pip check
  # downstreams:
  #   # Additional testing for downstream packages
  #   - jupyterlab 4.0.11
  #   - notebook 7.0.8
  #   - voila 0.5.7

about:
  home: https://github.com/jupyterlab/jupyterlab_server
  license: BSD-3-Clause
  license_family: BSD
  license_file: LICENSE
  summary: A set of server components for JupyterLab and JupyterLab like applications.
  description: |
    JupyterLab Server sits between JupyterLab and Jupyter Server, and provides a
    set of REST API handlers and utilities that are used by JupyterLab. It is a
    separate project in order to accommodate creating JupyterLab-like
    applications from a more limited scope.
  dev_url: https://github.com/jupyterlab/jupyterlab_server
  doc_url: https://jupyterlab-server.readthedocs.io

extra:
  skip-lints:
    # `packaging` is required, noted as a dependency by upstream:
    # https://github.com/jupyterlab/jupyterlab_server/blob/v2.22.0/pyproject.toml#L36
    # It is worth noting that the project still builds without it.
    - python_build_tool_in_run
  recipe-maintainers:
    - jasongrout
    - blink1073
    - afshin
    - SylvainCorlay
    - bollwyvl
    - jtpio
