[arch-commits] Commit in python-peewee/trunk (PKGBUILD skip-json1-tests.patch)
Felix Yan
fyan at archlinux.org
Tue Nov 24 16:05:10 UTC 2015
Date: Tuesday, November 24, 2015 @ 17:05:10
Author: fyan
Revision: 147691
upgpkg: python-peewee 2.7.3-1
Added:
python-peewee/trunk/skip-json1-tests.patch
Modified:
python-peewee/trunk/PKGBUILD
------------------------+
PKGBUILD | 14 ++++++++++----
skip-json1-tests.patch | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 46 insertions(+), 4 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2015-11-24 16:01:41 UTC (rev 147690)
+++ PKGBUILD 2015-11-24 16:05:10 UTC (rev 147691)
@@ -6,7 +6,7 @@
pkgname=python-peewee
pkgname=('python-peewee' 'python2-peewee')
-pkgver=2.7.2
+pkgver=2.7.3
pkgrel=1
pkgdesc="a little orm"
url="https://pypi.python.org/pypi/peewee/"
@@ -13,11 +13,17 @@
arch=('i686' 'x86_64')
license=('MIT')
makedepends=('python-setuptools' 'python2-setuptools' 'cython' 'cython2' 'git')
-checkdepends=('python-apsw' 'python2-apsw' 'python-flask' 'python2-flask')
-source=("git+https://github.com/coleifer/peewee.git#tag=$pkgver")
-sha256sums=('SKIP')
+checkdepends=('python-apsw' 'python2-apsw' 'python-flask' 'python2-flask'
+ 'python2-pysqlite') #'python-psycopg2' 'python2-psycopg2')
+source=("git+https://github.com/coleifer/peewee.git#tag=$pkgver"
+ skip-json1-tests.patch)
+sha256sums=('SKIP'
+ '6009dd05b2ce5e203bc2a2186a00aace1384cac830c8a6b71436e2c5586fb8a2')
prepare() {
+ # https://github.com/coleifer/peewee/issues/767
+ (cd peewee; patch -p1 -i ../skip-json1-tests.patch)
+
cp -a peewee{,-py2}
}
Added: skip-json1-tests.patch
===================================================================
--- skip-json1-tests.patch (rev 0)
+++ skip-json1-tests.patch 2015-11-24 16:05:10 UTC (rev 147691)
@@ -0,0 +1,36 @@
+From d6e4b1f9b0e63f523f5997b7f624c71ff7d344ff Mon Sep 17 00:00:00 2001
+From: Charles Leifer <coleifer at gmail.com>
+Date: Sat, 21 Nov 2015 20:20:58 -0600
+Subject: [PATCH] Check json1 installed, fixes #767
+
+---
+ playhouse/tests/test_sqlite_ext.py | 16 +++++++++++++++-
+ 1 file changed, 15 insertions(+), 1 deletion(-)
+
+diff --git a/playhouse/tests/test_sqlite_ext.py b/playhouse/tests/test_sqlite_ext.py
+index 634b644..e5c76d2 100644
+--- a/playhouse/tests/test_sqlite_ext.py
++++ b/playhouse/tests/test_sqlite_ext.py
+@@ -161,7 +161,21 @@ class TestVirtualModelChild(TestVirtualModel):
+ pass
+
+
+- at skip_unless(lambda: sqlite3.sqlite_version_info >= (3, 9, 0))
++def json_installed():
++ if sqlite3.sqlite_version_info < (3, 9, 0):
++ return False
++ # Test in-memory DB to determine if the FTS5 extension is installed.
++ tmp_db = sqlite3.connect(':memory:')
++ try:
++ tmp_db.execute('select json(?)', (1337,))
++ except:
++ return False
++ finally:
++ tmp_db.close()
++ return True
++
++
++ at skip_unless(json_installed)
+ class TestJSONField(ModelTestCase):
+ requires = [
+ APIData,
More information about the arch-commits
mailing list