Date: Friday, April 7, 2023 @ 07:28:46
Author: felixonmars
Revision: 1440830
archrelease: copy trunk to community-staging-any
Added:
python-lsprotocol/repos/community-staging-any/
python-lsprotocol/repos/community-staging-any/PKGBUILD
(from rev 1440829, python-lsprotocol/trunk/PKGBUILD)
----------+
PKGBUILD | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
Copied: python-lsprotocol/repos/community-staging-any/PKGBUILD (from rev
1440829, python-lsprotocol/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2023-04-07 07:28:46 UTC (rev 1440830)
@@ -0,0 +1,36 @@
+# Maintainer: Daniel M. Capella <[email protected]>
+
+_name=lsprotocol
+pkgname=python-lsprotocol
+pkgver=2023.0.0a1
+pkgrel=2
+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/packages/python
+ python -m build --wheel --skip-dependency-check --no-isolation
+}
+
+check() {
+ cd $_name
+ pytest tests/python
+}
+
+package() {
+ cd $_name/packages/python
+ 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
+}