aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-chameleon
diff options
context:
space:
mode:
authorprspkt <prspkt@protonmail.com>2019-06-14 22:21:25 +0300
committerprspkt <prspkt@protonmail.com>2019-06-14 22:46:36 +0300
commitf7a42cfab7571a092eeb10501bc4b957e780c4e3 (patch)
tree32ade2a6ff65333e01f83f779ac112722b4e1e95 /testing/py-chameleon
parent0d9b66d87722ac47cd0ae4a52665add4370bb229 (diff)
downloadaports-f7a42cfab7571a092eeb10501bc4b957e780c4e3.tar.bz2
aports-f7a42cfab7571a092eeb10501bc4b957e780c4e3.tar.xz
testing/py-chameleon: add python3
Diffstat (limited to 'testing/py-chameleon')
-rw-r--r--testing/py-chameleon/APKBUILD36
1 files changed, 32 insertions, 4 deletions
diff --git a/testing/py-chameleon/APKBUILD b/testing/py-chameleon/APKBUILD
index 6963b8a502..12b014e5d3 100644
--- a/testing/py-chameleon/APKBUILD
+++ b/testing/py-chameleon/APKBUILD
@@ -8,11 +8,11 @@ pkgdesc="A Fast Python HTML/XML Template Compiler"
url="https://chameleon.readthedocs.org"
arch="noarch"
license="BSD"
-depends="python2 py-lxml py-zope-interface"
+depends="py-setuptools"
depends_dev=""
-makedepends="python2-dev py-setuptools"
+makedepends="py2-setuptools py3-setuptools"
install=""
-subpackages=""
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
_builddir="$srcdir"/$_pkgname-$pkgver
@@ -29,11 +29,39 @@ prepare() {
build() {
cd "$_builddir"
python2 setup.py build || return 1
+ 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"
- python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
}
md5sums="6336d780dde9f7a4b8a5a8971dd983a1 Chameleon-2.16.tar.gz"