{% set version = "2.27.3" %}

package:
  name: jupyterlab_server-split
  version: {{ version }}

source:
  url: https://pypi.io/packages/source/j/jupyterlab_server/jupyterlab_server-{{ version }}.tar.gz
  sha256: eb36caca59e74471988f0ae25c77945610b887f777255aa21f8065def9e51ed4

build:
  number: 0
  noarch: python

requirements:
  host:
    - python >=3.8
  run:
    - python >=3.8

test:
  commands:
    - echo tests in outputs

outputs:
  - name: jupyterlab_server
    build:
      noarch: python
      script: {{ PYTHON }} -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv
    requirements:
      host:
        - hatchling >=1.5
        - pip
        - python >=3.8
      run:
        - babel >=2.10
        - importlib-metadata >=4.8.3
        - jinja2 >=3.0.3
        - json5 >=0.9.0
        - jsonschema >=4.18
        - jupyter_server >=1.21,<3
        - packaging >=21.3
        - python >=3.8
        - requests >=2.31
      run_constrained:
        # hard dep in jupyterlab_server-with-openapi:run
        - openapi-core >=0.18.0,<0.19.0
    test:
      requires:
        - pip
      imports:
        - jupyterlab_server
      commands:
        - pip check
      downstreams:
        - jupyterlab

  - name: jupyterlab_server-with-openapi
    build:
      noarch: python
    requirements:
      host:
        - python >=3.8
      run:
        - {{ pin_subpackage("jupyterlab_server", max_pin="x.x.x") }}
        # version pin in jupyterlab_server-with-openapi:run_constrained
        - openapi-core
        - python >=3.8
        - ruamel.yaml
    test:
      source_files:
        - tests
        - jupyterlab_server/test_data
      requires:
        - ipykernel
        - jsonschema >=4.18
        - openapi-spec-validator >=0.6.0,<0.8.0
        - pip
        - pytest >=7.0
        - pytest-console-scripts
        - pytest-cov
        - pytest-jupyter-server >=0.6.2
        - pytest-timeout
        - requests-mock
        - strict-rfc3339
        - werkzeug
      imports:
        - jupyterlab_server
      commands:
        - pip check
        - cd tests && pytest -vv --cov=jupyterlab_server --cov-report=term-missing:skip-covered --no-cov-on-fail --cov-fail-under=85

about:
  home: https://github.com/jupyterlab/jupyterlab_server
  license: BSD-3-Clause
  license_file: LICENSE
  summary: A set of server components for JupyterLab and JupyterLab like applications.
  doc_url: https://jupyterlab-server.readthedocs.io

extra:
  feedstock-name: jupyterlab_server
  recipe-maintainers:
    - jasongrout
    - blink1073
    - afshin
    - SylvainCorlay
    - bollwyvl
    - jtpio
