2
2
[alpine-aports] [PATCH] py-pystache: Add py3 package and update to 0.5.4
---
I also adopted this package since it's been dormant for 2 years
testing/py-pystache/APKBUILD | 61 +++++++++++++++++++++ ---------------
1 file changed, 36 insertions(+), 25 deletions(-)
diff --git a/testing/py-pystache/APKBUILD b/testing/py-pystache/APKBUILD
index d42d93073a..db6d2d9cc6 100644
--- a/testing/py-pystache/APKBUILD
+++ b/testing/py-pystache/APKBUILD
@@ -1,40 +1,51 @@
# Contributor: Paul Kilar <pkilar@gmail.com>
- # Maintainer: Paul Kilar <pkilar@gmail.com>
+ # Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=py-pystache
- _realname=pystache
- pkgver='0.5.3'
+ _pkgname=pystache
+ pkgver='0.5.4'
pkgrel=0
pkgdesc="Pystache is a Python implementation of Mustache."
url="https://pypi.python.org/pypi/pystache"
arch="noarch"
license="MIT"
- depends="python2"
- depends_dev=""
- makedepends="py-setuptools"
- install=""
- subpackages=""
- source="https://files.pythonhosted.org/packages/source/${_realname:0:1}/$_realname/$_realname-$pkgver.tar.gz"
- _builddir="$srcdir"/$_realname-$pkgver
+ makedepends="python2-dev python3-dev py-setuptools pytest"
+ subpackages="py2-${_pkgname}:_py2 py3-${_pkgname}:_py3"
+ source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
+ 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
+ cp -r "$builddir" "$builddir"-py3
}
- build() {
- cd "$_builddir"
- python2 setup.py build || return 1
+ check() {
+ cd "$builddir"
+ python2 setup.py check
+ pytest-2
+ cd "$builddir"-py3
+ python3 setup.py check
}
package() {
- cd "$_builddir"
- python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
+ mkdir -p "$pkgdir"
}
- md5sums="32beedc4ee01cca737ae8f05e65fb53f pystache-0.5.3.tar.gz"
- sha256sums="445c8663291abf11305693ecac7b9f3ff976555f5506ccc05a0353260a5a16dc pystache-0.5.3.tar.gz"
- sha512sums="2b77f3e26cf37e663b7414e5ca95667f8332bb1005ae835775543c0d2c282f0c7bd8ded3f1e06da930247e39e5d206fb3f90d80e7c556b98cd69d4be74836843 pystache-0.5.3.tar.gz"
+
+ _py2() {
+ cd "$builddir"
+ _py
+ }
+
+ _py3() {
+ cd "$builddir"-py3
+ _py
+ }
+
+ _py() {
+ local pyver="${subpkgname:2:1}"
+ local python="python$pyver"
+ pkgdesc="$pkgdesc (for $python)"
+ depends="$python ${depends//py-/py$pyver-}"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
+ }
+
+ sha512sums="4ac325e1431f58f740218c9ec309821db82d89989ef4ca7fc3536dea0ef1c90e8e85ebaa7df27f33129ca02252b84bcbd7429a1ed999b496f62f174dd66502cb pystache-0.5.4.tar.gz"
--
2.18.0
---
Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org
Help: alpine-aports+help@lists.alpinelinux.org
---
Hi,
On Sun, Jul 29, 2018 at 9:20 PM Drew DeVault <sir@cmpwn.com > wrote:
> ---
> I also adopted this package since it's been dormant for 2 years
>
> testing/py-pystache/APKBUILD | 61 +++++++++++++++++++++---------------
> 1 file changed, 36 insertions(+), 25 deletions(-)
>
>
sorry it seems it got merged a later patch which seems identical to this
one.
We need to be careful about timing.
/eo