Date: Saturday, April 8, 2023 @ 07:37:18
Author: felixonmars
Revision: 1442133
archrelease: copy trunk to community-staging-any
Added:
python-esbonio/repos/community-staging-any/
python-esbonio/repos/community-staging-any/PKGBUILD
(from rev 1442131, python-esbonio/trunk/PKGBUILD)
----------+
PKGBUILD | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
Copied: python-esbonio/repos/community-staging-any/PKGBUILD (from rev 1442131,
python-esbonio/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2023-04-08 07:37:18 UTC (rev 1442133)
@@ -0,0 +1,41 @@
+# Maintainer: Daniel M. Capella <[email protected]>
+# Contributor: Jeffrey Zhang <[email protected]>
+
+_name=esbonio
+pkgname=python-esbonio
+pkgver=0.16.1
+pkgrel=2
+pkgdesc='Language server for working with Sphinx projects'
+arch=('any')
+url=https://github.com/swyddfa/esbonio
+license=('MIT')
+depends=('python-appdirs' 'python-sphinx' 'python-pygls'
'python-pyspellchecker'
+ 'python-setuptools' 'python-typing_extensions')
+makedepends=('python-build' 'python-installer' 'python-setuptools'
+ 'python-wheel')
+checkdepends=('python-pytest-lsp' 'python-pytest-timeout')
+source=("$url/archive/esbonio-language-server-v$pkgver/$_name-$pkgver.tar.gz")
+b2sums=('7808385bc803d6ce34371b3e86ba827910ff9608df3ce0ad54e7b2fd4ca2c23851332dd54c80752d2d99602d2f4615495c73bdc0fd51d2da6d63f1945b7fadf8')
+
+build() {
+ cd esbonio-esbonio-language-server-v$pkgver/lib/esbonio
+ python -m build --wheel --skip-dependency-check --no-isolation
+}
+
+check() {
+ cd esbonio-esbonio-language-server-v$pkgver/lib/esbonio
+ python -m venv --system-site-packages test-env
+ test-env/bin/python -m installer dist/*.whl
+ PATH="$PWD/test-env/bin:$PATH" test-env/bin/python -m pytest
+}
+
+package() {
+ cd esbonio-esbonio-language-server-v$pkgver/lib/esbonio
+ 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
+}