Subject: [PATCH] testing/py3-minidb: new aport

From: Thiago Perrotta <[email-masked]>
Date: Wed, 29 Dec 2021 13:59:10 -0500

https://thp.io/2010/minidb
Simple SQLite3 store for Python objects
testing/

Signed-off-by: Thiago Perrotta <[email-masked]>
---
This is intended to be added as a dependency for testing/urlwatch.

 testing/py3-minidb/APKBUILD | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 testing/py3-minidb/APKBUILD

diff --git a/testing/py3-minidb/APKBUILD b/testing/py3-minidb/APKBUILD
new file mode 100644
index 0000000000..13e9eefedf
--- /dev/null
+++ b/testing/py3-minidb/APKBUILD
@@ -0,0 +1,37 @@
+# Contributor: Thiago Perrotta <[email-masked]>
+# Maintainer: Thiago Perrotta <[email-masked]>
+pkgname=py3-minidb
+pkgver=2.0.5
+pkgrel=0
+pkgdesc="Simple SQLite3 store for Python objects"
+url="https://thp.io/2010/minidb"
+arch="noarch"
+license="ISC"
+depends="python3"
+makedepends="py3-setuptools"
+checkdepends="py3-pytest"
+subpackages="$pkgname-doc"
+source="https://files.pythonhosted.org/packages/source/m/minidb/minidb-$pkgver.tar.gz"
+builddir="minidb-$pkgver/"
+
+build() {
+	python3 setup.py build
+}
+
+check() {
+	python3 -m venv --system-site-packages test-env
+	test-env/bin/python setup.py install --optimize=1 --skip-build
+	test-env/bin/python -m pytest
+}
+
+package() {
+	cd "$srcdir/$builddir"
+	python3 setup.py install --root="$pkgdir" --optimize=1 --skip-build
+
+	install -d "$pkgdir/usr/share/licenses/$pkgname"
+	sed -n '/# Copyright/,/OF THIS SOFTWARE./p' minidb.py > "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+}
+
+sha512sums="
+889e678a99c7a5dff5ae7ae2c3540e978f09616384450934f2f16797a3a06c9d863b57eced4b2cde0a4bdfa4923b754e473bde0905c86d948d3bdb81a8e6dbad  minidb-2.0.5.tar.gz
+"
-- 
2.34.1