# Contributor: Max Rees <maxcrees@me.com>
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=py3-pluggy
_pkgname=pluggy
pkgver=0.13.1
pkgrel=0
pkgdesc="Plugin management and hook calling for Python"
url="https://pypi.python.org/pypi/pluggy"
arch="noarch"
options="!check"  # Cyclic dependency with py3-pytest. Passes on x86_64
# Certified net clean
license="MIT"
depends="python3 py3-importlib_metadata"
checkdepends="py3-pytest"
makedepends="python3-dev"
source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/p/$_pkgname/$_pkgname-$pkgver.tar.gz
	scm.patch"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="$builddir/build/lib:$PYTHONPATH" pytest testing
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="eb747ff341cedacbd90eb20e22ad3d1ddf5588056f14d069f56331f4141a15b7eccaee23ea196d2f4906964ddb77a79b156bbf3ef8c8083e9952c55d13d55f3e  py3-pluggy-0.13.1.tar.gz
0d811c2ba311b64af7762d48f92d3df2d72e71398f5b42d4ae71a067810f6d4b6d0f0bc4a06529f7e335c54e70640cc8c82b00b5dccd54aee4310c24bfa5e7ce  scm.patch"