1 # Maintainer: Daniel M. Capella <polyzen@archlinux.org>
3 pkgname=jedi-language-server
6 pkgdesc='Language server for Jedi'
8 url=https://github.com/pappasam/jedi-language-server
10 depends=('python-docstring-to-markdown' 'python-jedi' 'python-pydantic'
12 makedepends=('python-build' 'python-installer' 'python-poetry-core')
13 checkdepends=('python-lsp-jsonrpc' 'python-pyhamcrest' 'python-pytest')
14 source=("$url/archive/v$pkgver/$pkgname-$pkgver.tar.gz"
15 'jedi-ls-migrate-to-python-lsp-jsonrpc.patch::https://github.com/pappasam/jedi-language-server/commit/5e6cdca4936271f0f85d06d4da59718c67efae9c.patch')
16 b2sums=('956b28824557e9910feac8274d3441ec7428481a58df253f0f066c4834882a115eaea21d4c026a7e1a023305fa99e2547f3df930971ac3c44be84eaae743e4d0'
17 '67d4688ce37b31bdcfd0192e118a9845f8c722f1bb6b73a175eb5fa78197fb6b9e62f62bd2b52084a6fa4f035a31168a37d17d17932af91a9e613ae08039efda')
21 patch --forward --strip=1 --input=../jedi-ls-migrate-to-python-lsp-jsonrpc.patch
23 # Remove include list https://github.com/pypa/wheel/issues/92
24 sed -i '/include = \["README.md"\]/d' pyproject.toml
29 python -m build --wheel --skip-dependency-check --no-isolation
35 local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
36 python -m installer --destdir=temp dist/*.whl
37 PATH="$PWD/temp/usr/bin:$PATH" PYTHONPATH="$PWD/temp/$site_packages" pytest tests
42 python -m installer --destdir="$pkgdir" dist/*.whl
44 # Symlink license file
45 local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
46 install -d "$pkgdir"/usr/share/licenses/$pkgname
47 ln -s "$site_packages"/${pkgname//-/_}-$pkgver.dist-info/LICENSE \
48 "$pkgdir"/usr/share/licenses/$pkgname/LICENSE