diff options
author | Leonardo Arena <rnalrd@alpinelinux.org> | 2017-12-20 11:27:49 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2017-12-21 10:47:13 +0000 |
commit | cb631983be24b13b624b0b14677c239f5a39d75e (patch) | |
tree | af19e18201825ff304115e52993a1495492fbfa6 /main/py-django-tables2/APKBUILD | |
parent | a0c6b18c3e42fe4b63a2abd544c18962f6cc144e (diff) | |
download | aports-cb631983be24b13b624b0b14677c239f5a39d75e.tar.bz2 aports-cb631983be24b13b624b0b14677c239f5a39d75e.tar.xz |
main/py-django-tables2: add support for python3
Diffstat (limited to 'main/py-django-tables2/APKBUILD')
-rw-r--r-- | main/py-django-tables2/APKBUILD | 47 |
1 files changed, 32 insertions, 15 deletions
diff --git a/main/py-django-tables2/APKBUILD b/main/py-django-tables2/APKBUILD index b9191e18e7..a7829804d0 100644 --- a/main/py-django-tables2/APKBUILD +++ b/main/py-django-tables2/APKBUILD @@ -2,34 +2,51 @@ # Maintainer: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> pkgname=py-django-tables2 pkgver=1.17.1 -pkgrel=0 +pkgrel=1 pkgdesc="Table/data-grid framework for Django" url=https://github.com/bradleyayers/django-tables2/ arch=noarch license=BSD depends="py-django py-six" -makedepends=py-setuptools +makedepends="py-setuptools" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" +options="!check" #no testsuite source="https://files.pythonhosted.org/packages/source/d/django-tables2/django-tables2-$pkgver.tar.gz" - -_builddir=$srcdir/django-tables2-$pkgver -prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} +builddir="$srcdir"/django-tables2-$pkgver build() { cd "$_builddir" - ./setup.py build + python2 setup.py --quiet build + python3 setup.py --quiet build } package() { cd "$_builddir" - ./setup.py install --root "$pkgdir" + mkdir -p "$pkgdir"/usr/bin } +_py2() { + depends="${depends//py-/py2-}" + replaces=$pkgname + provides="$pkgname-r$pkgver" + _py python2 +} + +_py3() { + depends="${depends//py-/py3-}" + _py python3 +} + +_py() { + local python="$1" + local pyver="${1:6:1}" + pkgdesc="$pkgdesc (for $python)" + depends="$depends $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py --quiet install --prefix=/usr --root="$subpkgdir" +} + + sha512sums="0c0fc60b68d129d8600f151ac954d10b2ad215055c6285fab8db8115dff41fea588fe5e1f52ab41fd6e0a3e8e52d76c37df81e894d7022d25c393e059bacfc80 django-tables2-1.17.1.tar.gz" |