aboutsummaryrefslogtreecommitdiffstats
path: root/testing/mycli
diff options
context:
space:
mode:
authorAndy Postnikov <apostnikov@gmail.com>2019-06-14 20:04:31 +0300
committerLeo <thinkabit.ukim@gmail.com>2019-06-20 10:31:03 -0300
commit4e5924a78def1da41bb7223b058bc93bbbc24caf (patch)
tree6852702a872ae9bec0ed8b780e4b48c0c5eead5f /testing/mycli
parente3bbc698437b70ad11ea7b673c1bca07afa70a14 (diff)
downloadaports-4e5924a78def1da41bb7223b058bc93bbbc24caf.tar.bz2
aports-4e5924a78def1da41bb7223b058bc93bbbc24caf.tar.xz
testing/mycli: use upstream patch for newer version of py3-sqlparse
it blocks upgrade of `community/py-sqlparse`
Diffstat (limited to 'testing/mycli')
-rw-r--r--testing/mycli/APKBUILD11
-rw-r--r--testing/mycli/fix-sqlparse.patch36
2 files changed, 43 insertions, 4 deletions
diff --git a/testing/mycli/APKBUILD b/testing/mycli/APKBUILD
index 84dcea6a28..0c12cbaffb 100644
--- a/testing/mycli/APKBUILD
+++ b/testing/mycli/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Thomas Boerger <thomas@webhippie.de>
pkgname=mycli
pkgver=1.19.0
-pkgrel=1
+pkgrel=2
pkgdesc="MySQL CLI with autocompletion and syntax highlighting"
url="https://www.mycli.net"
arch="noarch"
@@ -13,13 +13,15 @@ depends="python3
py3-pygments
py3-prompt_toolkit>2.0.0
py3-pymysql
- py3-sqlparse<0.3.0
+ py3-sqlparse<0.4.0
py3-configobj
py3-cryptography
py3-cli_helpers"
makedepends="python3-dev py3-setuptools"
checkdepends="pytest py3-mock"
-source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/${pkgname:0:1}/$pkgname/$pkgname-$pkgver.tar.gz"
+source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/${pkgname:0:1}/$pkgname/$pkgname-$pkgver.tar.gz
+ fix-sqlparse.patch
+ "
builddir="$srcdir/$pkgname-$pkgver"
check() {
@@ -37,4 +39,5 @@ package() {
python3 setup.py install --prefix=/usr --root="$pkgdir"
}
-sha512sums="6a8477f0bc360708d018e1e44867b7f832cddb5bb1054cecb5fd78e83602c410bdeaca2d1788ee4e53cc5e8d55570792d6bf4cdaad02904a596864595e0738c2 mycli-1.19.0.tar.gz"
+sha512sums="6a8477f0bc360708d018e1e44867b7f832cddb5bb1054cecb5fd78e83602c410bdeaca2d1788ee4e53cc5e8d55570792d6bf4cdaad02904a596864595e0738c2 mycli-1.19.0.tar.gz
+01f7b8352bb9a36b2a6fb61879479fbcc6c3e26754a68d42531a4aa526f662b360d2d1ab5913646f9540f303115d2914875e37e19fa101fdf8f3b5e7cf388d5d fix-sqlparse.patch"
diff --git a/testing/mycli/fix-sqlparse.patch b/testing/mycli/fix-sqlparse.patch
new file mode 100644
index 0000000000..0ad9eb4145
--- /dev/null
+++ b/testing/mycli/fix-sqlparse.patch
@@ -0,0 +1,36 @@
+From 3acecd9d69e87333c1887dc2e797fa20300b9a44 Mon Sep 17 00:00:00 2001
+From: Dick Marinus <dick@mrns.nl>
+Date: Sat, 18 May 2019 21:15:32 +0200
+Subject: [PATCH] fix unit tests, hard depend on 0.3.0
+
+---
+ mycli/packages/completion_engine.py | 2 +-
+ setup.py | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/mycli/packages/completion_engine.py b/mycli/packages/completion_engine.py
+index 2426f30c..c63a3428 100644
+--- a/mycli/packages/completion_engine.py
++++ b/mycli/packages/completion_engine.py
+@@ -84,7 +84,7 @@ def suggest_type(full_text, text_before_cursor):
+ # Be careful here because trivial whitespace is parsed as a statement,
+ # but the statement won't have a first token
+ tok1 = statement.token_first()
+- if tok1 and tok1.value in ['\\', 'source']:
++ if tok1 and (tok1.value == 'source' or tok1.value.startswith('\\')):
+ return suggest_special(text_before_cursor)
+
+ last_token = statement and statement.token_prev(len(statement.tokens))[1] or ''
+diff --git a/setup.py b/setup.py
+index 67ad0c85..3081f19c 100755
+--- a/setup.py
++++ b/setup.py
+@@ -21,7 +21,7 @@
+ 'Pygments >= 1.6',
+ 'prompt_toolkit>=2.0.6',
+ 'PyMySQL >= 0.9.2',
+- 'sqlparse>=0.2.2,<0.3.0',
++ 'sqlparse>=0.3.0,<0.4.0',
+ 'configobj >= 5.0.5',
+ 'cryptography >= 1.0.0',
+ 'cli_helpers[styles] >= 1.0.1',