summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Young2021-01-22 11:29:00 -0600
committerIan Young2021-01-22 11:29:00 -0600
commitf0835f83028c684b196bb49bc7d0895a8116103a (patch)
tree7345626fa31dca54b92b564a51ae20438a79b5f9
parente797e77bd7cda8958102c5d86e2a2fe9e468bbc5 (diff)
downloadaur-f0835f83028c684b196bb49bc7d0895a8116103a.tar.gz
Run tests in check
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD22
-rw-r--r--unittest.patch15
3 files changed, 39 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ad2e62ddb17a..8e507a4a5b28 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,21 @@
pkgbase = python-rollbar
pkgdesc = Easy and powerful exception tracking with rollbar
pkgver = 0.15.1
- pkgrel = 1
+ pkgrel = 2
url = https://rollbar.com/docs/notifier/pyrollbar/
arch = any
license = MIT
+ checkdepends = python-pytest-runner
+ checkdepends = python-blinker
+ checkdepends = python-webob
makedepends = python-setuptools
makedepends = git
depends = python-requests
depends = python-six
source = https://files.pythonhosted.org/packages/source/r/rollbar/rollbar-0.15.1.tar.gz
+ source = unittest.patch
sha256sums = 96b63df27a47232aa16a142d2f5812073f8bf7db2b81c5f7981b9a4d4659468c
+ sha256sums = 9842ace5f40a793ca513129ab7456093513405496da4a8bc6bdbf1d31d72933b
pkgname = python-rollbar
diff --git a/PKGBUILD b/PKGBUILD
index cab22dfa7536..892d3950d331 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,15 +3,30 @@
pkgname=python-rollbar
_name=rollbar
pkgver=0.15.1
-pkgrel=1
+pkgrel=2
pkgdesc="Easy and powerful exception tracking with rollbar"
arch=(any)
url="https://rollbar.com/docs/notifier/pyrollbar/"
license=('MIT')
depends=('python-requests' 'python-six')
makedepends=('python-setuptools' 'git')
-source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
-sha256sums=("96b63df27a47232aa16a142d2f5812073f8bf7db2b81c5f7981b9a4d4659468c")
+checkdepends=('python-pytest-runner'
+ 'python-blinker'
+ 'python-webob')
+source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz"
+ "unittest.patch")
+sha256sums=("96b63df27a47232aa16a142d2f5812073f8bf7db2b81c5f7981b9a4d4659468c"
+ "9842ace5f40a793ca513129ab7456093513405496da4a8bc6bdbf1d31d72933b")
+
+prepare() {
+ cd "$_name-$pkgver"
+ patch --strip=1 < ../unittest.patch
+}
+
+check() {
+ cd "$srcdir/$_name-$pkgver"
+ pytest
+}
build() {
cd "$srcdir/$_name-$pkgver"
@@ -22,4 +37,3 @@ package() {
cd "$srcdir/$_name-$pkgver"
python setup.py install -O1 --skip-build --root="$pkgdir"
}
-
diff --git a/unittest.patch b/unittest.patch
new file mode 100644
index 000000000000..68970f9f39a8
--- /dev/null
+++ b/unittest.patch
@@ -0,0 +1,15 @@
+diff --color --unified --recursive --text package.orig/rollbar/test/__init__.py package.new/rollbar/test/__init__.py
+--- package.orig/rollbar/test/__init__.py 2021-01-22 11:01:54.720286530 -0600
++++ package.new/rollbar/test/__init__.py 2021-01-22 11:06:50.502491404 -0600
+@@ -1,9 +1,9 @@
+-import unittest2
++import unittest
+
+
+ SNOWMAN = b'\xe2\x98\x83'
+ SNOWMAN_UNICODE = SNOWMAN.decode('utf8')
+
+
+-class BaseTest(unittest2.TestCase):
++class BaseTest(unittest.TestCase):
+ pass