upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / python-pytest-lsp / repos / community-any / PKGBUILD
blob549a90ff2f433486cdfbdf414442c4ad1855729d
1 # Maintainer: Daniel M. Capella <polyzen@archlinux.org>
2 # Contributor: Jeffrey Zhang <zhang.lei.fly@gmail.com>
4 _name=pytest-lsp
5 pkgname=python-pytest-lsp
6 pkgver=0.2.1
7 pkgrel=2
8 pkgdesc='Pytest plugin for end-to-end testing of language servers'
9 arch=('any')
10 url=https://swyddfa.github.io/lsp-devtools
11 license=('MIT')
12 depends=('python-appdirs' 'python-pygls' 'python-pytest-asyncio')
13 makedepends=('python-build' 'python-installer' 'python-setuptools'
14              'python-wheel')
15 source=("https://github.com/swyddfa/lsp-devtools/archive/pytest-lsp-v$pkgver/$_name-$pkgver.tar.gz")
16 b2sums=('de9cf14c37e6be093cbb16628edfa8afbc42ffad637174cb0f3db28138924283c381e5a995e67ab593a46cc3c58cc06e049d2c756f8633336ba8c94e08c42f2d')
18 build() {
19   cd lsp-devtools-pytest-lsp-v$pkgver/lib/pytest-lsp
20   python -m build --wheel --skip-dependency-check --no-isolation
23 check() {
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
30 package() {
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