[arch-commits] Commit in python-subunit/repos (2 files)
Evangelos Foutras
foutrelis at archlinux.org
Fri Oct 25 20:11:01 UTC 2019
Date: Friday, October 25, 2019 @ 20:11:00
Author: foutrelis
Revision: 519778
archrelease: copy trunk to community-staging-any
Added:
python-subunit/repos/community-staging-any/
python-subunit/repos/community-staging-any/PKGBUILD
(from rev 519777, python-subunit/trunk/PKGBUILD)
----------+
PKGBUILD | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)
Copied: python-subunit/repos/community-staging-any/PKGBUILD (from rev 519777, python-subunit/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2019-10-25 20:11:00 UTC (rev 519778)
@@ -0,0 +1,56 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-subunit
+pkgname=('python-subunit' 'python2-subunit')
+pkgver=1.3.0
+pkgrel=3
+pkgdesc="Python implementation of subunit test streaming protocol"
+arch=('any')
+license=('Apache')
+url="https://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.io/packages/source/p/python-subunit/python-subunit-$pkgver.tar.gz")
+sha512sums=('387c9ce8ed679d8998d33c7a295412e4f9de46b8dccdfab92eb82d8c4290958760b6c9bd99d50abd0836e4556c1b0c0132fc01e16801a3113844ab1bf28cf962')
+
+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 subunit2disk; do
+ mv "$pkgdir"/usr/bin/$name{,-python2}
+ done
+}
More information about the arch-commits
mailing list