# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
pkgname=py3-zope-deferredimport
_pkgname=zope.deferredimport
pkgver=5.0
pkgrel=1
pkgdesc="Defer imports until used by code"
options="!check" # Requires py3-zope-testrunner, is in testing
url="https://github.com/zopefoundation/$_pkgname"
arch="noarch"
license="ZPL-2.1"
depends="py3-setuptools py3-zope-proxy"
checkdepends="py3-zope-testrunner"
subpackages="$pkgname-pyc"
source="$_pkgname-$pkgver.tar.gz::https://github.com/zopefoundation/$_pkgname/archive/$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

replaces="py-zope-deferredimport" # Backwards compatibility
provides="py-zope-deferredimport=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	python3 setup.py test
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
bbc840ed0e0c03c87840f2a2290710c149258d3f63eeef2d6192d57d9f7dea42e29ae91adfa8b80e90ce2301aedd73c5426700eee42cdd3282d33bb1c8b6855f  zope.deferredimport-5.0.tar.gz
"
