From 4d5225844506d7f7bc45d902e9bc916bfe673c4b Mon Sep 17 00:00:00 2001 From: Rasmus Thomsen Date: Thu, 13 Feb 2020 20:29:03 +0100 Subject: [PATCH] testing/py3-injector: new aport http://github.com/alecthomas/injector Python dependency injection framework, inspired by Guice --- testing/py3-injector/APKBUILD | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 testing/py3-injector/APKBUILD diff --git a/testing/py3-injector/APKBUILD b/testing/py3-injector/APKBUILD new file mode 100644 index 00000000000..25d29209ee1 --- /dev/null +++ b/testing/py3-injector/APKBUILD @@ -0,0 +1,29 @@ +# Contributor: Rasmus Thomsen +# Maintainer: Rasmus Thomsen +pkgname=py3-injector +pkgver=0.18.3 +pkgrel=0 +pkgdesc="Python dependency injection framework, inspired by Guice" +url="http://github.com/alecthomas/injector" +arch="noarch" +license="BSD-3-Clause" +depends="python3 py3-typing-extensions" +makedepends="py3-setuptools" +checkdepends="py3-pytest" +options="!check" # Tests apparently aren't in pypi tarballs? +source="https://files.pythonhosted.org/packages/source/i/injector/injector-$pkgver.tar.gz" +builddir="$srcdir/injector-$pkgver" + +build() { + python3 setup.py build +} + +check() { + PYTHONPATH="$(echo $PWD/build/lib.*)" pytest-3 +} + +package() { + python3 setup.py install --prefix=/usr --root="$pkgdir" +} + +sha512sums="109473abd0f4ee693c168a024d241464239bff35d950d5001f2b160d6b28e24eb6254c809fde1179a5106f6e523acbe3eabc286533dd7998d0e75f6f0dc6fb4e injector-0.18.3.tar.gz"