1 # Maintainer: Daniel M. Capella <polyzen@archlinux.org>
2 # Contributor: Jeffrey Zhang <zhang.lei.fly@gmail.com>
5 pkgname=python-pytest-lsp
8 pkgdesc='Pytest plugin for end-to-end testing of language servers'
10 url=https://swyddfa.github.io/lsp-devtools
12 depends=('python-appdirs' 'python-pygls' 'python-pytest-asyncio')
13 makedepends=('python-build' 'python-installer' 'python-setuptools'
15 source=("https://github.com/swyddfa/lsp-devtools/archive/pytest-lsp-v$pkgver/$_name-$pkgver.tar.gz")
16 b2sums=('de9cf14c37e6be093cbb16628edfa8afbc42ffad637174cb0f3db28138924283c381e5a995e67ab593a46cc3c58cc06e049d2c756f8633336ba8c94e08c42f2d')
19 cd lsp-devtools-pytest-lsp-v$pkgver/lib/pytest-lsp
20 python -m build --wheel --skip-dependency-check --no-isolation
24 cd lsp-devtools-pytest-lsp-v$pkgver/lib/pytest-lsp
25 python -m venv --system-site-packages test-env
26 test-env/bin/python -m installer dist/*.whl
27 test-env/bin/python -m pytest
31 cd lsp-devtools-pytest-lsp-v$pkgver/lib/pytest-lsp
32 python -m installer --destdir="$pkgdir" dist/*.whl
34 # Symlink license file
35 local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
36 install -d "$pkgdir"/usr/share/licenses/$pkgname
37 ln -s "$site_packages"/pytest_lsp-$pkgver.dist-info/LICENSE \
38 "$pkgdir"/usr/share/licenses/$pkgname/LICENSE