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

Daniel M. Capella polyzen at archlinux.org
Sun Jul 19 15:14:00 UTC 2020


    Date: Sunday, July 19, 2020 @ 15:13:59
  Author: polyzen
Revision: 664585

upgpkg: python-minidb 2.0.4-1

Modified:
  python-minidb/trunk/PKGBUILD

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

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-07-19 15:05:45 UTC (rev 664584)
+++ PKGBUILD	2020-07-19 15:13:59 UTC (rev 664585)
@@ -1,26 +1,36 @@
-# Maintainer: Balló György <ballogyor+arch at gmail dot com>
+# Maintainer: Daniel M. Capella <polyzen at archlinux.org>
+# Contributor: Balló György <ballogyor+arch at gmail dot com>
 
+_name=minidb
 pkgname=python-minidb
-_pkgname=minidb
-pkgver=2.0.3
+pkgver=2.0.4
 pkgrel=1
-pkgdesc="A simple SQLite3 store for Python objects"
+pkgdesc='Simple SQLite3 store for Python objects'
 arch=('any')
-url="https://thp.io/2010/minidb/"
+url=https://thp.io/2010/minidb/
 license=('ISC')
 depends=('python')
-source=("$_pkgname-$pkgver.tar.gz::https://github.com/thp/$_pkgname/archive/$pkgver.tar.gz")
-md5sums=('6d3132af381b0a78f78d2641bc4d7022')
+checkdepends=('python-pytest')
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
+sha256sums=('c1c62be076a1e4bb9dd880504dd81a3e7e027b7657e8a54a83c5a2727f09520a')
 
 build() {
-  cd $_pkgname-$pkgver
-  python3 setup.py build
+  cd $_name-$pkgver
+  python setup.py build
 }
 
+check() {
+  cd $_name-$pkgver
+  mkdir -p temp
+  local sitepackages=$(python -c "import site; print(site.getsitepackages()[0])")
+  python setup.py install --skip-build --root=temp
+  PATH="$PWD/temp/usr/bin:$PATH" PYTHONPATH="$PWD/temp/$sitepackages" pytest
+}
+
 package() {
-  cd $_pkgname-$pkgver
-  python3 setup.py install --root="$pkgdir" --optimize=1
+  cd $_name-$pkgver
+  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
 
-  install -dm755 "$pkgdir/usr/share/licenses/$pkgname"
-  sed -n '/# Copyright/,/OF THIS SOFTWARE./p' minidb.py > "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+  install -d "$pkgdir"/usr/share/licenses/$pkgname
+  sed -n '/# Copyright/,/OF THIS SOFTWARE./p' minidb.py > "$pkgdir"/usr/share/licenses/$pkgname/COPYING
 }


More information about the arch-commits mailing list