testing/py3-injector: new aport

http://github.com/alecthomas/injector
Python dependency injection framework, inspired by Guice
This commit is contained in:
Rasmus Thomsen 2020-02-13 20:29:03 +01:00
parent 8e9595a9c0
commit 4d52258445

View File

@ -0,0 +1,29 @@
# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
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"