[arch-commits] Commit in python-pycapnp/trunk (PKGBUILD)

David Runge dvzrv at gemini.archlinux.org
Wed Aug 31 09:56:03 UTC 2022


    Date: Wednesday, August 31, 2022 @ 09:56:03
  Author: dvzrv
Revision: 1289138

upgpkg: python-pycapnp 1.1.1-2: capnproto 0.10.2 rebuild

Modified:
  python-pycapnp/trunk/PKGBUILD

----------+
 PKGBUILD |   29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-08-31 09:48:54 UTC (rev 1289137)
+++ PKGBUILD	2022-08-31 09:56:03 UTC (rev 1289138)
@@ -1,33 +1,36 @@
 # Maintainer: Felix Yan <felixonmars at archlinux.org>
 
+_name=pycapnp
 pkgname=python-pycapnp
 pkgver=1.1.1
-pkgrel=1
+pkgrel=2
 pkgdesc="A cython wrapping of the C++ Cap'n Proto library"
 url="https://github.com/capnproto/pycapnp"
-license=('BSD')
-arch=('x86_64')
-depends=('capnproto' 'python')
-makedepends=('cython' 'python-build' 'python-installer' 'python-pkgconfig' 'python-setuptools' 'python-wheel')
-checkdepends=('python-pytest')
-source=("https://github.com/capnproto/pycapnp/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
+license=(BSD)
+arch=(x86_64)
+depends=(capnproto python)
+makedepends=(cython python-build python-installer python-pkgconfig python-setuptools python-wheel)
+checkdepends=(python-pytest)
+source=(https://github.com/capnproto/$_name/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
 sha512sums=('649271e5fa64fe4b3c23897f96896b2790b13bca634b07f4d5e155e263ef919615d39daceb8b167918b7e4375b2b2d89df95fb9e78166768591e053b93e54940')
 
 build() {
-  cd pycapnp-$pkgver
+  cd $_name-$pkgver
   python -m build --wheel --no-isolation
 }
 
 check() {
-  local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
+  local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
 
-  cd pycapnp-$pkgver
-  PYTHONPATH="build/lib.linux-$CARCH-$python_version" pytest
+  cd $_name-$pkgver
+  python -m installer --destdir=test_dir dist/*.whl
+  export PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH"
+  pytest -vv
 }
 
 package() {
-  cd pycapnp-$pkgver
+  cd $_name-$pkgver
   python -m installer --destdir="$pkgdir" dist/*.whl
 
-  install -Dm644 LICENSE.md -t "$pkgdir"/usr/share/licenses/$pkgname/
+  install -vDm 644 LICENSE.md -t "$pkgdir"/usr/share/licenses/$pkgname/
 }



More information about the arch-commits mailing list