Date: Tuesday, December 27, 2022 @ 22:47:01
  Author: polyzen
Revision: 1368873

Add lsprotocol for pygls 1.0.0

Added:
  python-lsprotocol/
  python-lsprotocol/repos/
  python-lsprotocol/trunk/
  python-lsprotocol/trunk/PKGBUILD

----------+
 PKGBUILD |   36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

Added: python-lsprotocol/trunk/PKGBUILD
===================================================================
--- python-lsprotocol/trunk/PKGBUILD                            (rev 0)
+++ python-lsprotocol/trunk/PKGBUILD    2022-12-27 22:47:01 UTC (rev 1368873)
@@ -0,0 +1,36 @@
+# Maintainer: Daniel M. Capella <[email protected]>
+
+_name=lsprotocol
+pkgname=python-lsprotocol
+pkgver=2022.0.0a9
+pkgrel=1
+pkgdesc='Python implementation of the Language Server Protocol'
+arch=('any')
+url=https://github.com/microsoft/lsprotocol
+license=('MIT')
+depends=('python-cattrs')
+makedepends=('git' 'python-build' 'python-flit-core' 'python-installer')
+checkdepends=('python-jsonschema' 'python-pyhamcrest' 'python-pytest')
+source=("git+$url.git?tag=$pkgver")
+b2sums=('SKIP')
+
+build() {
+  cd $_name
+  python -m build --wheel --skip-dependency-check --no-isolation
+}
+
+check() {
+  cd $_name
+  pytest tests
+}
+
+package() {
+  cd $_name
+  python -m installer --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 \
+    "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}

Reply via email to