diff options
Diffstat (limited to 'community/py3-zope-deferredimport')
-rw-r--r-- | community/py3-zope-deferredimport/APKBUILD | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/community/py3-zope-deferredimport/APKBUILD b/community/py3-zope-deferredimport/APKBUILD new file mode 100644 index 0000000000..ca36a1f227 --- /dev/null +++ b/community/py3-zope-deferredimport/APKBUILD @@ -0,0 +1,54 @@ +# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org> +# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org> +pkgname=py-zope-deferredimport +_pkgname=zope.deferredimport +pkgver=4.3.1 +pkgrel=0 +pkgdesc="Defer imports until used by code" +url="https://github.com/zopefoundation/$_pkgname" +arch="noarch" +license="ZPL-2.1" +depends="py-setuptools py-zope-proxy" +makedepends="python2-dev python3-dev" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" +source="$_pkgname-$pkgver.tar.gz::https://github.com/zopefoundation/$_pkgname/archive/$pkgver.tar.gz" + +builddir="$srcdir"/$_pkgname-$pkgver + +build() { + python2 setup.py build + python3 setup.py build +} + +check() { + python2 setup.py test + python3 setup.py test +} + +package() { + mkdir -p "$pkgdir" +} + +_py2() { + replaces="$pkgname" + depends="${depends//py-/py2-}" + _py python2 +} + +_py3() { + depends="${depends//py-/py3-}" + _py python3 +} + +_py() { + local python="$1" + pkgdesc="$pkgdesc (for $python)" + depends="$depends $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" +} + + +sha512sums="1c367def232ec79ad10a9d8f1e068598d2fdb49b067c2c3f44c9ad25c198afbbf2d52659c3795aad76f8c82d212e49086b81ab1c1dcc6aac2e3ce66c35ff5750 zope.deferredimport-4.3.1.tar.gz" |