[arch-commits] Commit in python-testrepository/repos (2 files)
Evangelos Foutras
foutrelis at archlinux.org
Sat Dec 24 18:33:22 UTC 2016
Date: Saturday, December 24, 2016 @ 18:33:21
Author: foutrelis
Revision: 201760
archrelease: copy trunk to community-staging-any
Added:
python-testrepository/repos/community-staging-any/
python-testrepository/repos/community-staging-any/PKGBUILD
(from rev 201759, python-testrepository/trunk/PKGBUILD)
----------+
PKGBUILD | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
Copied: python-testrepository/repos/community-staging-any/PKGBUILD (from rev 201759, python-testrepository/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2016-12-24 18:33:21 UTC (rev 201760)
@@ -0,0 +1,54 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-testrepository
+pkgname=('python-testrepository' 'python2-testrepository')
+pkgver=0.0.20
+pkgrel=2
+pkgdesc="A repository of test results."
+arch=('any')
+license=('Apache' 'BSD')
+url="https://launchpad.net/testrepository"
+makedepends=('python-setuptools' 'python2-setuptools' 'python-fixtures' 'python2-fixtures'
+ 'python-testtools' 'python2-testtools' 'python-subunit' 'python2-subunit')
+checkdepends=('python-testresources' 'python2-testresources' 'python-pytz' 'python2-pytz'
+ 'python-testscenarios' 'python2-testscenarios')
+source=("https://pypi.python.org/packages/source/t/testrepository/testrepository-$pkgver.tar.gz")
+sha512sums=('df14500e2b27b6f39d9d4c4f42961efd63dfe25186e561eb1678952a8ab9311f17c36b78819fea33e0ac879c47a33d45c31ff58be017609c8a6157905ee712d6')
+
+prepare() {
+ cp -a testrepository-$pkgver{,-py2}
+}
+
+build() {
+ cd "$srcdir/testrepository-$pkgver"
+ python setup.py build
+
+ cd "$srcdir/testrepository-$pkgver-py2"
+ python2 setup.py build
+}
+
+check() {
+ cd "$srcdir/testrepository-$pkgver"
+ PYTHON=python python ./testr init
+ PYTHON=python python ./testr run --parallel || warning "Tests failed"
+
+ cd "$srcdir/testrepository-$pkgver-py2"
+ PYTHON=python2 python2 ./testr init
+ PYTHON=python2 python2 ./testr run --parallel || warning "Tests failed"
+}
+
+package_python-testrepository() {
+ depends=('python-testtools' 'python-fixtures' 'python-subunit')
+
+ cd testrepository-$pkgver
+ python setup.py install --root="${pkgdir}" --optimize=1
+}
+
+package_python2-testrepository() {
+ depends=('python2-testtools' 'python2-fixtures' 'python2-subunit')
+
+ cd testrepository-$pkgver-py2
+ python2 setup.py install --root="${pkgdir}" --optimize=1
+ mv "$pkgdir"/usr/bin/testr{,2}
+}
More information about the arch-commits
mailing list