{% set name = "python-lsp-server" %}
{% set version = "1.12.0" %}

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

source:
  url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/{{ name | replace("-", "_") }}-{{ version }}.tar.gz
  sha256: b6a336f128da03bd9bac1e61c3acca6e84242b8b31055a1ccf49d83df9dc053b

build:
  number: 0
  skip: True  # [py<38]
  script: {{ PYTHON }} -m pip install . --no-deps --no-build-isolation -vv
  entry_points:
    - pylsp = pylsp.__main__:main

requirements:
  host:
    - python
    - pip
    - setuptools >=61.2.0
    - setuptools_scm >=3.4.3
    - wheel
  run:
  # Required Dependencies
    - python
    - docstring-to-markdown
    - importlib-metadata >=4.8.3  # [py<310]
    - jedi >=0.17.2,<0.20.0
    - pluggy >=1.0.0
    - python-lsp-jsonrpc >=1.1.0,<2.0.0
    - ujson >=3.0.0
  # Optional Dependencies - which have been included in our past releases
    - autopep8 >=2.0.4,<2.1.0
    - flake8 >=7.1,<8
    - mccabe >=0.7.0,<0.8.0
    - pycodestyle >=2.12.0,<2.13.0
    - pydocstyle >=6.3.0,<6.4.0
    - pyflakes >=3.2.0,<3.3.0
    - pylint >=3.1,<4
    - rope >=1.11.0
    - yapf >=0.33.0
    - whatthepatch >=1.0.2,<2.0.0
  run_constrained:
    - websockets >=10.3

test:
  imports:
    - pylsp
    - pylsp.config
    - pylsp.plugins
  requires:
    - pip
    - pytest
    - numpy
    - pandas
    - matplotlib
    - pyqt >=5,<6  # [not s390x]
    - flaky
  source_files:
    - .pylintrc
    - test
  commands:
    - pylsp --help
    - pip check
    # pyqt5 does not exist for s390x.
    - pytest -v test -k "not test_pyqt_completion"  # [s390x]
    # tests on osx-64 want to take place outside of test dirs and in places without removal permissions
    - pytest -v test                                # [not (s390x or (osx and x86_64))]

about:
  home: https://github.com/python-lsp/python-lsp-server
  license: MIT
  license_family: MIT
  license_file: LICENSE
  summary: An implementation of the Language Server Protocol for Python
  description: |
    A Python 3.8+ implementation of the Language Server Protocol
    making use of Jedi, pycodestyle, Pyflakes and YAPF.
  dev_url: https://github.com/python-lsp/python-lsp-server
  doc_url: https://github.com/python-lsp/python-lsp-server/blob/develop/README.md

extra:
  recipe-maintainers:
    - ccordoba12
    - andfoy
    - steff456
  skip-lints:
    - python_build_tool_in_run
