[arch-commits] Commit in python-subunit/repos (2 files)
Felix Yan
felixonmars at archlinux.org
Sat Dec 24 16:27:37 UTC 2016
Date: Saturday, December 24, 2016 @ 16:27:36
Author: felixonmars
Revision: 201551
archrelease: copy trunk to community-staging-any
Added:
python-subunit/repos/community-staging-any/
python-subunit/repos/community-staging-any/PKGBUILD
(from rev 201550, python-subunit/trunk/PKGBUILD)
----------+
PKGBUILD | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
Copied: python-subunit/repos/community-staging-any/PKGBUILD (from rev 201550, python-subunit/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2016-12-24 16:27:36 UTC (rev 201551)
@@ -0,0 +1,57 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-subunit
+pkgname=('python-subunit' 'python2-subunit')
+pkgver=1.2.0
+pkgrel=2
+pkgdesc="Python implementation of subunit test streaming protocol"
+arch=('any')
+license=('Apache')
+url="http://launchpad.net/subunit"
+makedepends=('python-setuptools' 'python2-setuptools' 'python-extras' 'python2-extras'
+ 'python-testtools' 'python2-testtools')
+checkdepends=('python-fixtures' 'python2-fixtures' 'python-hypothesis' 'python2-hypothesis'
+ 'python-testscenarios' 'python2-testscenarios')
+source=("https://pypi.python.org/packages/source/p/python-subunit/python-subunit-$pkgver.tar.gz")
+sha512sums=('SKIP')
+
+prepare() {
+ sed -i 's|import unittest2 as unittest|import unittest|' python-subunit-$pkgver/python/subunit/tests/test_test_protocol.py
+
+ cp -a python-subunit-$pkgver{,-py2}
+}
+
+build() {
+ cd "$srcdir/python-subunit-$pkgver"
+ python setup.py build
+
+ cd "$srcdir/python-subunit-$pkgver-py2"
+ python2 setup.py build
+}
+
+check() {
+ cd "$srcdir/python-subunit-$pkgver"
+ PYTHONPATH="$PWD/build/lib:$PYTHONPATH" python -m testtools.run subunit.test_suite || warning "Tests failed"
+
+ cd "$srcdir/python-subunit-$pkgver-py2"
+ PYTHONPATH="$PWD/build/lib:$PYTHONPATH" python2 -m testtools.run subunit.test_suite || warning "Tests failed"
+}
+
+package_python-subunit() {
+ depends=('python-extras' 'python-testtools')
+
+ cd python-subunit-$pkgver
+ python setup.py install --root="${pkgdir}" --optimize=1
+}
+
+package_python2-subunit() {
+ depends=('python2-extras' 'python2-testtools')
+
+ cd python-subunit-$pkgver-py2
+ python2 setup.py install --root="${pkgdir}" --optimize=1
+
+ for name in subunit-1to2 subunit-2to1 subunit-filter subunit-ls subunit-notify subunit-output subunit-stats subunit-tags subunit2csv subunit2gtk subunit2junitxml subunit2pyunit tap2subunit; do
+ mv "$pkgdir"/usr/bin/$name{,-python2}
+ done
+}
More information about the arch-commits
mailing list