diff options
author | TBK <tbk@jjtc.dk> | 2017-12-11 23:07:15 +0100 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2017-12-13 10:30:05 +0000 |
commit | 3c4c7c7357466243ab8be337f2de590184cca90c (patch) | |
tree | adedb540bdcfc558349e6e8715a08f72affff2b5 /testing | |
parent | 0e6b7fe971de24022011fd517082eb9af0cc19f8 (diff) | |
download | aports-3c4c7c7357466243ab8be337f2de590184cca90c.tar.bz2 aports-3c4c7c7357466243ab8be337f2de590184cca90c.tar.xz |
testing/py-cheetah: upgrade to 3.0.0; modernize
Diffstat (limited to 'testing')
-rw-r--r-- | testing/py-cheetah/APKBUILD | 63 |
1 files changed, 39 insertions, 24 deletions
diff --git a/testing/py-cheetah/APKBUILD b/testing/py-cheetah/APKBUILD index eafdfa95a2..fc1ec6416d 100644 --- a/testing/py-cheetah/APKBUILD +++ b/testing/py-cheetah/APKBUILD @@ -1,40 +1,55 @@ # Contributor: Matt Dainty <matt+alpine@bodgit-n-scarper.com> -# Maintainer: +# Maintainer: TBK <alpine@jjtc.eu> pkgname=py-cheetah -_pkgname=Cheetah -pkgver=2.4.4 +_pkgreal=${pkgname#py-} +_pkgname=Cheetah3 +pkgver=3.0.0 pkgrel=0 pkgdesc="Cheetah is a template engine and code generation tool" url="http://www.cheetahtemplate.org/" arch="all" license="MIT" -depends="python2" -makedepends="python2-dev" -install="" -subpackages="" +makedepends="python2-dev python3-dev py-setuptools" +subpackages="py3-$_pkgreal:_py3 py2-$_pkgreal:_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() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done +build() { + cd "$builddir" + python2 setup.py build + python3 setup.py build } -build() { - cd "$_builddir" - python2 setup.py build || return 1 +check() { + cd "$builddir" + python2 setup.py check + python3 setup.py check } + package() { - cd "$_builddir" - python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1 + 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" } -md5sums="853917116e731afbc8c8a43c37e6ddba Cheetah-2.4.4.tar.gz" -sha256sums="be308229f0c1e5e5af4f27d7ee06d90bb19e6af3059794e5fd536a6f29a9b550 Cheetah-2.4.4.tar.gz" -sha512sums="11b8cbf7d71789d6ae83596b133ddbe0bf1ccf2bca4c59562e7cd1d9bb75fa9d3208c0021d7d77edafdb03fd399cf1a26c003267fbffb94f27bf4457b0f9234c Cheetah-2.4.4.tar.gz" +sha512sums="861356cbb0cc5c698eecce6b0393cd16658748f372c731d3ed9bfa1741c5bdb209d350561bafba8fc3cf96c0d1a7f00e9caa1d7367e228d50710ba803a47383c Cheetah3-3.0.0.tar.gz" |