[arch-commits] Commit in python-testtools/repos (2 files)
Evangelos Foutras
foutrelis at archlinux.org
Mon Nov 9 12:13:15 UTC 2020
Date: Monday, November 9, 2020 @ 12:13:15
Author: foutrelis
Revision: 746862
archrelease: copy trunk to community-staging-any
Added:
python-testtools/repos/community-staging-any/
python-testtools/repos/community-staging-any/PKGBUILD
(from rev 746861, python-testtools/trunk/PKGBUILD)
----------+
PKGBUILD | 45 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
Copied: python-testtools/repos/community-staging-any/PKGBUILD (from rev 746861, python-testtools/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2020-11-09 12:13:15 UTC (rev 746862)
@@ -0,0 +1,45 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgname=python-testtools
+pkgver=2.4.0
+pkgrel=2
+pkgdesc="Extensions to the Python standard library unit testing framework"
+arch=('any')
+license=('MIT')
+url="https://github.com/testing-cabal/testtools"
+depends=('python-pbr' 'python-extras' 'python-fixtures' 'python-pyrsistent' 'python-mimeparse')
+makedepends=('python-setuptools')
+checkdepends=('python-testscenarios')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/testing-cabal/testtools/archive/$pkgver.tar.gz")
+sha512sums=('7983c6666b8d4dae3bc4e37d967e09f735d0753a9f517f00e53c4884d86c56d3272bb34d56a8246c74e44cff0087a713973a9cd4aa5d86f9ec8d60e842a6db92')
+
+export PBR_VERSION=$pkgver
+
+prepare() {
+ # These are for python 2.x and old python 3.x only
+ sed -i 's|unittest2|unittest|' testtools-$pkgver/testtools/tests/test_run.py \
+ testtools-$pkgver/testtools/tests/test_testsuite.py \
+ testtools-$pkgver/testtools/tests/twistedsupport/test_matchers.py \
+ testtools-$pkgver/testtools/tests/twistedsupport/test_deferred.py \
+ testtools-$pkgver/testtools/tests/twistedsupport/test_runtest.py
+ sed -i '/unittest2>=1.0.0/d' testtools-$pkgver/requirements.txt
+ sed -i 's|import linecache2 as linecache|import linecache|' testtools-$pkgver/testtools/tests/test_compat.py
+ sed -i "s|traceback = try_import('traceback2')|import traceback|" testtools-$pkgver/testtools/content.py
+ sed -i '/traceback2/d' testtools-$pkgver/requirements.txt
+}
+
+build() {
+ cd testtools-$pkgver
+ python setup.py build
+}
+
+check() {
+ cd testtools-$pkgver
+ python -m testtools.run testtools.tests.test_suite
+}
+
+package() {
+ cd testtools-$pkgver
+ python setup.py install --root="$pkgdir" --optimize=1
+ install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
More information about the arch-commits
mailing list