aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-zope-deferredimport
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-09-07 07:19:10 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-09-07 07:32:31 -0300
commit47adcbaf3825a41fa3ab6a233f04c7bba8108663 (patch)
tree3cdd55a0342cb3171a91852b95e75e7c90c52221 /community/py3-zope-deferredimport
parentc6f2cd90cb20c6a77eb12dd9d42c31207c1d885e (diff)
downloadaports-47adcbaf3825a41fa3ab6a233f04c7bba8108663.tar.bz2
aports-47adcbaf3825a41fa3ab6a233f04c7bba8108663.tar.xz
community/py3-zope-deferredimport: rename from py-zope-deferredimport
Diffstat (limited to 'community/py3-zope-deferredimport')
-rw-r--r--community/py3-zope-deferredimport/APKBUILD54
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"