1 Commits

Author SHA1 Message Date
Daniel M. Capella
e7ff74987d Use PEP 517 2021-06-20 05:08:49 +00:00

View File

@@ -4,13 +4,14 @@
_name=pygls
pkgname=python-pygls
pkgver=0.10.3
pkgrel=2
pkgrel=3
pkgdesc='Pythonic generic implementation of the Language Server Protocol'
arch=('any')
url=https://github.com/openlawlibrary/pygls
license=('APACHE')
depends=('python-pydantic' 'python-typeguard')
makedepends=('python-setuptools-scm' 'python-toml')
makedepends=('python-build' 'python-install' 'python-setuptools-scm'
'python-toml' 'python-wheel')
checkdepends=('python-mock' 'python-pytest' 'python-pytest-asyncio')
source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
sha256sums=('522c1068dd38c4945925ca742daba6aff5621168e0e5ddd954813e8b957ca831')
@@ -18,7 +19,7 @@ b2sums=('86eb889b73cdc7eb99b92e419e4d00d46d2662984dcf872c4ca2bc3040f3e13dda4f086
build() {
cd $_name-$pkgver
python setup.py build
python -m build --wheel --skip-dependency-check --no-isolation
}
check() {
@@ -28,7 +29,14 @@ check() {
package() {
cd $_name-$pkgver
python setup.py install --root="$pkgdir" --optimize=1 --skip-build
export PYTHONHASHSEED=0
python -m install --optimize=1 --destdir="$pkgdir" dist/*.whl
# Symlink license file
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
install -d "$pkgdir"/usr/share/licenses/$pkgname
ln -s $site_packages/$_name-$pkgver.dist-info/LICENSE.txt \
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
}
# vim:set ts=2 sw=2 et: