diff options
Diffstat (limited to 'community/py-zope-hookable')
-rw-r--r-- | community/py-zope-hookable/APKBUILD | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/community/py-zope-hookable/APKBUILD b/community/py-zope-hookable/APKBUILD new file mode 100644 index 0000000000..3625f5d8be --- /dev/null +++ b/community/py-zope-hookable/APKBUILD @@ -0,0 +1,56 @@ +# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org> +# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org> +pkgname=py-zope-hookable +_pkgname=zope.hookable +pkgver=4.2.0 +pkgrel=0 +pkgdesc="Represents the core of the Zope hookable Architecture" +url="https://github.com/zopefoundation/$_pkgname" +arch="all" +license="ZPL" +depends="py-setuptools" +makedepends="python2-dev python3-dev py-setuptools" +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() { + cd "$builddir" + python2 setup.py build + python3 setup.py build +} + +check() { + cd "$builddir" + 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="aeeafff7e5c7cbe3d5944864278896f926086514e75be1d5956e32fc0a3769ac11b008c3855a0816084c7deb64f14c65db49852dac2beaf06420a304af6ebb69 zope.hookable-4.2.0.tar.gz" |