X-Original-To: alpine-aports@lists.alpinelinux.org Received: from mail.cmpwn.com (mail.cmpwn.com [45.56.77.53]) by lists.alpinelinux.org (Postfix) with ESMTP id 5E0B45C5431 for ; Sun, 29 Jul 2018 19:20:05 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cmpwn.com; s=cmpwn; t=1532892289; bh=I7LUBiIj5n18oLCThgXVCBWwAZRmcBm74UDCkGOqH0I=; h=From:To:Cc:Subject:Date; b=IMChsUTt77egYFwCvwzJukbUYGDewRFS0VaoI603IjUPF5iduHfAaYkthLIHA1TkY wgKQInvcN8ad0eh3aA58ky/yoiLd4c4U44kwo5IURHXm2++b6+ZvNnWljBM5i0d3lm NoVpqnQUNA5n19fB1LO6rpqCjMTEe609BSILrsuU= From: Drew DeVault To: alpine-aports@lists.alpinelinux.org Cc: Drew DeVault Subject: [alpine-aports] [PATCH] py-pystache: Add py3 package and update to 0.5.4 Date: Sun, 29 Jul 2018 15:20:02 -0400 Message-Id: <20180729192002.8003-1-sir@cmpwn.com> X-Mailer: git-send-email 2.18.0 X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: --- 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 -# Maintainer: Paul Kilar +# Maintainer: Drew DeVault 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 ---