Date: Saturday, December 24, 2016 @ 16:29:16 Author: felixonmars Revision: 201553
archrelease: copy trunk to community-staging-any Added: python-testscenarios/repos/community-staging-any/ python-testscenarios/repos/community-staging-any/PKGBUILD (from rev 201552, python-testscenarios/trunk/PKGBUILD) ----------+ PKGBUILD | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) Copied: python-testscenarios/repos/community-staging-any/PKGBUILD (from rev 201552, python-testscenarios/trunk/PKGBUILD) =================================================================== --- community-staging-any/PKGBUILD (rev 0) +++ community-staging-any/PKGBUILD 2016-12-24 16:29:16 UTC (rev 201553) @@ -0,0 +1,49 @@ +# $Id$ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +pkgbase=python-testscenarios +pkgname=('python-testscenarios' 'python2-testscenarios') +pkgver=0.5.0 +pkgrel=2 +pkgdesc="Testscenarios, a pyunit extension for dependency injection" +arch=('any') +license=('Apache') +url="https://launchpad.net/testscenarios" +makedepends=('python-setuptools' 'python2-setuptools' 'python-pbr' 'python2-pbr' + 'python-testtools' 'python2-testtools') +source=("https://pypi.python.org/packages/source/t/testscenarios/testscenarios-$pkgver.tar.gz") +sha512sums=('f08b868babf504482369c5cb945d3e95bca1cc00f92d5013f6898c488051be0c26dc49aaabcef362aea45450a8d041d9826fb6b5c848beec013fb102d6935521') + +prepare() { + cp -a testscenarios-$pkgver{,-py2} +} + +build() { + cd "$srcdir/testscenarios-$pkgver" + python setup.py build + + cd "$srcdir/testscenarios-$pkgver-py2" + python2 setup.py build +} + +check() { + cd "$srcdir/testscenarios-$pkgver" + python -m testtools.run testscenarios.test_suite + + cd "$srcdir/testscenarios-$pkgver-py2" + python2 -m testtools.run testscenarios.test_suite +} + +package_python-testscenarios() { + depends=('python-testtools') + + cd testscenarios-$pkgver + python setup.py install --root="${pkgdir}" --optimize=1 +} + +package_python2-testscenarios() { + depends=('python2-testtools') + + cd testscenarios-$pkgver-py2 + python2 setup.py install --root="${pkgdir}" --optimize=1 +}