aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2016-11-10 13:33:58 +0000
committerJakub Jirutka <jakub@jirutka.cz>2016-11-19 20:23:01 +0100
commit506a7514dfff4ba237f33bdce96a5d1222057cb1 (patch)
tree875fe7000859d7df1cc6b960e53694df8df28c27
parent2b8264d60c195bd95430f6b00dfb8199bbfcbf83 (diff)
downloadaports-506a7514dfff4ba237f33bdce96a5d1222057cb1.tar.gz
aports-506a7514dfff4ba237f33bdce96a5d1222057cb1.tar.bz2
aports-506a7514dfff4ba237f33bdce96a5d1222057cb1.tar.xz
community/py-tempita: add py2/py3 subpackages
-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"