Date: Monday, November 28, 2016 @ 02:30:07 Author: felixonmars Revision: 197057
upgpkg: python-sh 1.12.0-1 Modified: python-sh/trunk/PKGBUILD ----------+ PKGBUILD | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2016-11-28 02:27:14 UTC (rev 197056) +++ PKGBUILD 2016-11-28 02:30:07 UTC (rev 197057) @@ -3,42 +3,52 @@ # Contributor: Daniel Wallace <danielwallace at gtmanfred dot com> # Contributor: Alexander Rødseth <rods...@gmail.com> -_pkgname=sh -pkgname=("python-$_pkgname" "python2-$_pkgname") -pkgver=1.11 -pkgrel=2 +pkgname=("python-sh" "python2-sh") +pkgver=1.12.0 +pkgrel=1 pkgdesc='Subprocess interface that allows you to call any program as if it were a function' arch=('any') url='http://pypi.python.org/pypi/sh' license=('MIT') makedepends=('python-setuptools' 'python2-setuptools') -source=("http://pypi.python.org/packages/source/s/sh/$_pkgname-$pkgver.tar.gz") -md5sums=('7af8df6c92d29ff927b6db0146bddec3') +checkdepends=('python-coverage' 'python2-coverage') +source=("https://pypi.io/packages/source/s/sh/sh-$pkgver.tar.gz") +md5sums=('7d64fcb51713ecb118dc58776ea8741f') +prepare() { + cp -a sh-$pkgver{,-py2} +} + build() { - cp -r "$_pkgname-$pkgver" "python2-$_pkgname-$pkgver" - - cd $_pkgname-$pkgver + cd "$srcdir"/sh-$pkgver python setup.py build - cd ../python2-$_pkgname-$pkgver + cd "$srcdir"/sh-$pkgver-py2 python2 setup.py build } +check() { + cd "$srcdir"/sh-$pkgver + python sh.py travis || warning "Tests failed" + + cd "$srcdir"/sh-$pkgver-py2 + python2 sh.py travis || warning "Tests failed" +} + package_python-sh() { depends=('python') - cd $_pkgname-$pkgver + cd sh-$pkgver python setup.py install -O1 --root="$pkgdir" - install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/python-sh/LICENSE" + install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/python-sh/LICENSE } package_python2-sh() { depends=('python2') - cd python2-$_pkgname-$pkgver + cd sh-$pkgver-py2 python2 setup.py install -O1 --root="$pkgdir" - install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/python2-sh/LICENSE" + install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/python2-sh/LICENSE } # vim:set ts=2 sw=2 et: