aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--community/py-tempita/APKBUILD50
1 files changed, 32 insertions, 18 deletions
diff --git a/community/py-tempita/APKBUILD b/community/py-tempita/APKBUILD
index 54864c330a..846de0f65a 100644
--- a/community/py-tempita/APKBUILD
+++ b/community/py-tempita/APKBUILD
@@ -3,40 +3,54 @@
pkgname=py-tempita
_pkgname=Tempita
pkgver=0.5.2
-pkgrel=1
+pkgrel=2
pkgdesc="A small templating language"
-url="http://pythonpaste.org/tempita/"
+url="https://pypi.python.org/pypi/Tempita"
arch="noarch"
license="MIT"
-depends=""
-depends_dev=""
-makedepends="python2-dev py-setuptools"
-install=""
-subpackages="py2-${pkgname/py-/}:_py2"
+makedepends="python2-dev py-setuptools python3-dev"
+subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
-builddir="$srcdir"/$_pkgname-$pkgver
+prepare() {
+ default_prepare || return 1
+
+ local pyver; for pyver in 2 3; do
+ cp -r "$builddir" "$builddir-$pyver" || return 1
+ done
+}
build() {
- cd "$builddir"
+ cd "$builddir-2"
python2 setup.py build || return 1
+
+ cd "$builddir-3"
+ 2to3 -w . || return 1
+ python3 setup.py build
}
package() {
mkdir -p "$pkgdir"
}
-_py() {
- local python=$1
- pkgdesc="$pkgdesc - $python"
- install_if="$pkgname=$pkgver-r$pkgrel $python"
- cd "$builddir"
- $python setup.py install --prefix=/usr --root="$subpkgdir"
-}
-
_py2() {
- _py python2
replaces="$pkgname"
+ _py python2
+}
+
+_py3() {
+ _py python3
+}
+
+_py() {
+ local python="$1"
+ local pyver="${1:6:1}"
+ pkgdesc="$pkgdesc (for $python)"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+ cd "$builddir"-$pyver
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
}
md5sums="4c2f17bb9d481821c41b6fbee904cea1 Tempita-0.5.2.tar.gz"