[arch-commits] Commit in jedi-language-server/trunk (PKGBUILD)

Daniel M. Capella polyzen at archlinux.org
Sun Jun 20 05:26:58 UTC 2021


    Date: Sunday, June 20, 2021 @ 05:26:57
  Author: polyzen
Revision: 965826

upgpkg: jedi-language-server 0.32.0-3: Add check()

Modified:
  jedi-language-server/trunk/PKGBUILD

----------+
 PKGBUILD |   18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-06-20 05:10:10 UTC (rev 965825)
+++ PKGBUILD	2021-06-20 05:26:57 UTC (rev 965826)
@@ -2,7 +2,7 @@
 
 pkgname=jedi-language-server
 pkgver=0.32.0
-pkgrel=2
+pkgrel=3
 pkgdesc='Language server for Jedi'
 arch=('any')
 url=https://github.com/pappasam/jedi-language-server
@@ -9,9 +9,9 @@
 license=('MIT')
 depends=('python-docstring-to-markdown' 'python-jedi' 'python-pygls')
 makedepends=('python-build' 'python-install' 'python-poetry')
-source=("https://files.pythonhosted.org/packages/source/${pkgname::1}/$pkgname/$pkgname-$pkgver.tar.gz")
-sha256sums=('08eb5bff423d61ad56ae3bffb036638c1f6ae154daf57218148c274f4a9ea591')
-b2sums=('3265cb3c7118e520aeafd264a8e0089d0dad1537f12dd46358b2d96d86f1f4a894619e8fa9fc06421631f916a618249e0b35283d7ba0c39e8379caa190b96c1f')
+checkdepends=('python-jsonrpc-server' 'python-pyhamcrest' 'python-pytest')
+source=("$url/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
+b2sums=('3b6507eb17f5b7433b0c88b66361b7c077a06bd1b1680908e6328dfd8db20a882cbe25714717618f538159843274ecc64c4de912edde7659c98e41f880277a79')
 
 prepare() {
   cd $pkgname-$pkgver
@@ -24,6 +24,14 @@
   python -m build --wheel --skip-dependency-check --no-isolation
 }
 
+check() {
+  cd $pkgname-$pkgver
+  mkdir -p temp
+  local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+  python -m install --optimize=1 --destdir=temp dist/*.whl
+  PATH="$PWD/temp/usr/bin:$PATH" PYTHONPATH="$PWD/temp/$site_packages" pytest tests
+}
+
 package() {
   cd $pkgname-$pkgver
   export PYTHONHASHSEED=0
@@ -30,7 +38,7 @@
   python -m install --optimize=1 --destdir="$pkgdir" dist/*.whl
 
   # https://github.com/FFY00/python-install/pull/6
-  chmod +x "$pkgdir"/usr/bin/$pkgname
+  chmod +x "$pkgdir"/usr/bin/*
 
   # Symlink license file
   local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")



More information about the arch-commits mailing list